aws-sdk-servicediscovery 1.19.0 → 1.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/aws-sdk-servicediscovery.rb +7 -4
- data/lib/aws-sdk-servicediscovery/client.rb +862 -50
- data/lib/aws-sdk-servicediscovery/client_api.rb +94 -2
- data/lib/aws-sdk-servicediscovery/errors.rb +83 -8
- data/lib/aws-sdk-servicediscovery/resource.rb +1 -0
- data/lib/aws-sdk-servicediscovery/types.rb +445 -107
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1ea6a23cdeb37419f0c80584af95ea204123d3034ef0fce80eead2c750824ad1
|
4
|
+
data.tar.gz: db78ee159f8eefc2c2c5b47c88d705ca495e72380dfdf5a46f507da2ff014cbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c2bb51c11f991d3b3a261f9b57ba555411cd68d7995e67fe07db79b3485d644b4d95f11204302ff03dcc98107fe05dd087bb04d564a870959a73f2503a16fe7
|
7
|
+
data.tar.gz: e97e1a7e84269ff6bab6bb2fe89b13e3fc7b7bf91cef85c33fdb095c4885e496c5aa122079be34be5253d2389679b4f85740d02547103992375daaf34e9748ec
|
@@ -24,17 +24,20 @@ require_relative 'aws-sdk-servicediscovery/customizations'
|
|
24
24
|
# methods each accept a hash of request parameters and return a response
|
25
25
|
# structure.
|
26
26
|
#
|
27
|
+
# service_discovery = Aws::ServiceDiscovery::Client.new
|
28
|
+
# resp = service_discovery.create_http_namespace(params)
|
29
|
+
#
|
27
30
|
# See {Client} for more information.
|
28
31
|
#
|
29
32
|
# # Errors
|
30
33
|
#
|
31
|
-
# Errors returned from AWS Cloud Map
|
32
|
-
# extend {Errors::ServiceError}.
|
34
|
+
# Errors returned from AWS Cloud Map are defined in the
|
35
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
33
36
|
#
|
34
37
|
# begin
|
35
38
|
# # do stuff
|
36
39
|
# rescue Aws::ServiceDiscovery::Errors::ServiceError
|
37
|
-
# # rescues all
|
40
|
+
# # rescues all AWS Cloud Map API errors
|
38
41
|
# end
|
39
42
|
#
|
40
43
|
# See {Errors} for more information.
|
@@ -42,6 +45,6 @@ require_relative 'aws-sdk-servicediscovery/customizations'
|
|
42
45
|
# @service
|
43
46
|
module Aws::ServiceDiscovery
|
44
47
|
|
45
|
-
GEM_VERSION = '1.
|
48
|
+
GEM_VERSION = '1.24.0'
|
46
49
|
|
47
50
|
end
|
@@ -30,6 +30,18 @@ require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
|
30
30
|
Aws::Plugins::GlobalConfiguration.add_identifier(:servicediscovery)
|
31
31
|
|
32
32
|
module Aws::ServiceDiscovery
|
33
|
+
# An API client for ServiceDiscovery. To construct a client, you need to configure a `:region` and `:credentials`.
|
34
|
+
#
|
35
|
+
# client = Aws::ServiceDiscovery::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.
|
33
45
|
class Client < Seahorse::Client::Base
|
34
46
|
|
35
47
|
include Aws::ClientStubs
|
@@ -93,7 +105,7 @@ module Aws::ServiceDiscovery
|
|
93
105
|
# @option options [required, String] :region
|
94
106
|
# The AWS region to connect to. The configured `:region` is
|
95
107
|
# used to determine the service `:endpoint`. When not passed,
|
96
|
-
# a default `:region` is
|
108
|
+
# a default `:region` is searched for in the following locations:
|
97
109
|
#
|
98
110
|
# * `Aws.config[:region]`
|
99
111
|
# * `ENV['AWS_REGION']`
|
@@ -108,6 +120,12 @@ module Aws::ServiceDiscovery
|
|
108
120
|
# When set to `true`, a thread polling for endpoints will be running in
|
109
121
|
# the background every 60 secs (default). Defaults to `false`.
|
110
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
|
+
#
|
111
129
|
# @option options [Boolean] :client_side_monitoring (false)
|
112
130
|
# When `true`, client-side metrics will be collected for all API requests from
|
113
131
|
# this client.
|
@@ -132,6 +150,10 @@ module Aws::ServiceDiscovery
|
|
132
150
|
# When `true`, an attempt is made to coerce request parameters into
|
133
151
|
# the required types.
|
134
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
|
+
#
|
135
157
|
# @option options [Boolean] :disable_host_prefix_injection (false)
|
136
158
|
# Set to true to disable SDK automatically adding host prefix
|
137
159
|
# to default service endpoint when available.
|
@@ -139,7 +161,7 @@ module Aws::ServiceDiscovery
|
|
139
161
|
# @option options [String] :endpoint
|
140
162
|
# The client endpoint is normally constructed from the `:region`
|
141
163
|
# option. You should only configure an `:endpoint` when connecting
|
142
|
-
# to test endpoints. This should be
|
164
|
+
# to test endpoints. This should be a valid HTTP(S) URI.
|
143
165
|
#
|
144
166
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
145
167
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -154,7 +176,7 @@ module Aws::ServiceDiscovery
|
|
154
176
|
# requests fetching endpoints information. Defaults to 60 sec.
|
155
177
|
#
|
156
178
|
# @option options [Boolean] :endpoint_discovery (false)
|
157
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
179
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
158
180
|
#
|
159
181
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
160
182
|
# The log formatter.
|
@@ -166,15 +188,29 @@ module Aws::ServiceDiscovery
|
|
166
188
|
# The Logger instance to send log messages to. If this option
|
167
189
|
# is not set, logging will be disabled.
|
168
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
|
+
#
|
169
197
|
# @option options [String] :profile ("default")
|
170
198
|
# Used when loading credentials from the shared credentials file
|
171
199
|
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
172
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
|
+
#
|
173
205
|
# @option options [Float] :retry_base_delay (0.3)
|
174
|
-
# The base delay in seconds used by the default backoff function.
|
206
|
+
# The base delay in seconds used by the default backoff function. This option
|
207
|
+
# is only used in the `legacy` retry mode.
|
175
208
|
#
|
176
209
|
# @option options [Symbol] :retry_jitter (:none)
|
177
|
-
# A delay randomiser function used by the default backoff function.
|
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.
|
178
214
|
#
|
179
215
|
# @see https://www.awsarchitectureblog.com/2015/03/backoff.html
|
180
216
|
#
|
@@ -182,11 +218,30 @@ module Aws::ServiceDiscovery
|
|
182
218
|
# The maximum number of times to retry failed requests. Only
|
183
219
|
# ~ 500 level server errors and certain ~ 400 level client errors
|
184
220
|
# are retried. Generally, these are throttling errors, data
|
185
|
-
# checksum errors, networking errors, timeout errors
|
186
|
-
# errors from expired credentials.
|
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.
|
187
224
|
#
|
188
225
|
# @option options [Integer] :retry_max_delay (0)
|
189
|
-
# The maximum number of seconds to delay between retries (0 for no limit)
|
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
|
+
#
|
190
245
|
#
|
191
246
|
# @option options [String] :secret_access_key
|
192
247
|
#
|
@@ -219,16 +274,15 @@ module Aws::ServiceDiscovery
|
|
219
274
|
# requests through. Formatted like 'http://proxy.com:123'.
|
220
275
|
#
|
221
276
|
# @option options [Float] :http_open_timeout (15) The number of
|
222
|
-
# seconds to wait when opening a HTTP session before
|
277
|
+
# seconds to wait when opening a HTTP session before raising a
|
223
278
|
# `Timeout::Error`.
|
224
279
|
#
|
225
280
|
# @option options [Integer] :http_read_timeout (60) The default
|
226
281
|
# number of seconds to wait for response data. This value can
|
227
|
-
# safely be set
|
228
|
-
# per-request on the session yeidled by {#session_for}.
|
282
|
+
# safely be set per-request on the session.
|
229
283
|
#
|
230
284
|
# @option options [Float] :http_idle_timeout (5) The number of
|
231
|
-
# seconds a connection is allowed to sit
|
285
|
+
# seconds a connection is allowed to sit idle before it is
|
232
286
|
# considered stale. Stale connections are closed and removed
|
233
287
|
# from the pool before making a request.
|
234
288
|
#
|
@@ -237,7 +291,7 @@ module Aws::ServiceDiscovery
|
|
237
291
|
# request body. This option has no effect unless the request has
|
238
292
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
239
293
|
# disables this behaviour. This value can safely be set per
|
240
|
-
# request on the session
|
294
|
+
# request on the session.
|
241
295
|
#
|
242
296
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
243
297
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -274,7 +328,7 @@ module Aws::ServiceDiscovery
|
|
274
328
|
#
|
275
329
|
#
|
276
330
|
#
|
277
|
-
# [1]:
|
331
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
278
332
|
#
|
279
333
|
# @option params [required, String] :name
|
280
334
|
# The name that you want to assign to this namespace.
|
@@ -291,16 +345,44 @@ module Aws::ServiceDiscovery
|
|
291
345
|
# @option params [String] :description
|
292
346
|
# A description for the namespace.
|
293
347
|
#
|
348
|
+
# @option params [Array<Types::Tag>] :tags
|
349
|
+
# The tags to add to the namespace. Each tag consists of a key and an
|
350
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
351
|
+
# character length of 128 characters, and tag values can have a maximum
|
352
|
+
# length of 256 characters.
|
353
|
+
#
|
294
354
|
# @return [Types::CreateHttpNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
295
355
|
#
|
296
356
|
# * {Types::CreateHttpNamespaceResponse#operation_id #operation_id} => String
|
297
357
|
#
|
358
|
+
#
|
359
|
+
# @example Example: CreateHttpNamespace example
|
360
|
+
#
|
361
|
+
# # This example creates an HTTP namespace.
|
362
|
+
#
|
363
|
+
# resp = client.create_http_namespace({
|
364
|
+
# creator_request_id: "example-creator-request-id-0001",
|
365
|
+
# description: "Example.com AWS Cloud Map HTTP Namespace",
|
366
|
+
# name: "example-http.com",
|
367
|
+
# })
|
368
|
+
#
|
369
|
+
# resp.to_h outputs the following:
|
370
|
+
# {
|
371
|
+
# operation_id: "httpvoqozuhfet5kzxoxg-a-response-example",
|
372
|
+
# }
|
373
|
+
#
|
298
374
|
# @example Request syntax with placeholder values
|
299
375
|
#
|
300
376
|
# resp = client.create_http_namespace({
|
301
377
|
# name: "NamespaceName", # required
|
302
378
|
# creator_request_id: "ResourceId",
|
303
379
|
# description: "ResourceDescription",
|
380
|
+
# tags: [
|
381
|
+
# {
|
382
|
+
# key: "TagKey", # required
|
383
|
+
# value: "TagValue", # required
|
384
|
+
# },
|
385
|
+
# ],
|
304
386
|
# })
|
305
387
|
#
|
306
388
|
# @example Response structure
|
@@ -326,7 +408,7 @@ module Aws::ServiceDiscovery
|
|
326
408
|
#
|
327
409
|
#
|
328
410
|
#
|
329
|
-
# [1]:
|
411
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
330
412
|
#
|
331
413
|
# @option params [required, String] :name
|
332
414
|
# The name that you want to assign to this namespace. When you create a
|
@@ -349,10 +431,32 @@ module Aws::ServiceDiscovery
|
|
349
431
|
# The ID of the Amazon VPC that you want to associate the namespace
|
350
432
|
# with.
|
351
433
|
#
|
434
|
+
# @option params [Array<Types::Tag>] :tags
|
435
|
+
# The tags to add to the namespace. Each tag consists of a key and an
|
436
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
437
|
+
# character length of 128 characters, and tag values can have a maximum
|
438
|
+
# length of 256 characters.
|
439
|
+
#
|
352
440
|
# @return [Types::CreatePrivateDnsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
353
441
|
#
|
354
442
|
# * {Types::CreatePrivateDnsNamespaceResponse#operation_id #operation_id} => String
|
355
443
|
#
|
444
|
+
#
|
445
|
+
# @example Example: Example: Create private DNS namespace
|
446
|
+
#
|
447
|
+
# # Example: Create private DNS namespace
|
448
|
+
#
|
449
|
+
# resp = client.create_private_dns_namespace({
|
450
|
+
# creator_request_id: "eedd6892-50f3-41b2-8af9-611d6e1d1a8c",
|
451
|
+
# name: "example.com",
|
452
|
+
# vpc: "vpc-1c56417b",
|
453
|
+
# })
|
454
|
+
#
|
455
|
+
# resp.to_h outputs the following:
|
456
|
+
# {
|
457
|
+
# operation_id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
|
458
|
+
# }
|
459
|
+
#
|
356
460
|
# @example Request syntax with placeholder values
|
357
461
|
#
|
358
462
|
# resp = client.create_private_dns_namespace({
|
@@ -360,6 +464,12 @@ module Aws::ServiceDiscovery
|
|
360
464
|
# creator_request_id: "ResourceId",
|
361
465
|
# description: "ResourceDescription",
|
362
466
|
# vpc: "ResourceId", # required
|
467
|
+
# tags: [
|
468
|
+
# {
|
469
|
+
# key: "TagKey", # required
|
470
|
+
# value: "TagValue", # required
|
471
|
+
# },
|
472
|
+
# ],
|
363
473
|
# })
|
364
474
|
#
|
365
475
|
# @example Response structure
|
@@ -385,7 +495,7 @@ module Aws::ServiceDiscovery
|
|
385
495
|
#
|
386
496
|
#
|
387
497
|
#
|
388
|
-
# [1]:
|
498
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
389
499
|
#
|
390
500
|
# @option params [required, String] :name
|
391
501
|
# The name that you want to assign to this namespace.
|
@@ -402,16 +512,44 @@ module Aws::ServiceDiscovery
|
|
402
512
|
# @option params [String] :description
|
403
513
|
# A description for the namespace.
|
404
514
|
#
|
515
|
+
# @option params [Array<Types::Tag>] :tags
|
516
|
+
# The tags to add to the namespace. Each tag consists of a key and an
|
517
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
518
|
+
# character length of 128 characters, and tag values can have a maximum
|
519
|
+
# length of 256 characters.
|
520
|
+
#
|
405
521
|
# @return [Types::CreatePublicDnsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
406
522
|
#
|
407
523
|
# * {Types::CreatePublicDnsNamespaceResponse#operation_id #operation_id} => String
|
408
524
|
#
|
525
|
+
#
|
526
|
+
# @example Example: CreatePublicDnsNamespace example
|
527
|
+
#
|
528
|
+
# # This example creates a public namespace based on DNS.
|
529
|
+
#
|
530
|
+
# resp = client.create_public_dns_namespace({
|
531
|
+
# creator_request_id: "example-creator-request-id-0003",
|
532
|
+
# description: "Example.com AWS Cloud Map Public DNS Namespace",
|
533
|
+
# name: "example-public-dns.com",
|
534
|
+
# })
|
535
|
+
#
|
536
|
+
# resp.to_h outputs the following:
|
537
|
+
# {
|
538
|
+
# operation_id: "dns2voqozuhfet5kzxoxg-a-response-example",
|
539
|
+
# }
|
540
|
+
#
|
409
541
|
# @example Request syntax with placeholder values
|
410
542
|
#
|
411
543
|
# resp = client.create_public_dns_namespace({
|
412
544
|
# name: "NamespaceName", # required
|
413
545
|
# creator_request_id: "ResourceId",
|
414
546
|
# description: "ResourceDescription",
|
547
|
+
# tags: [
|
548
|
+
# {
|
549
|
+
# key: "TagKey", # required
|
550
|
+
# value: "TagValue", # required
|
551
|
+
# },
|
552
|
+
# ],
|
415
553
|
# })
|
416
554
|
#
|
417
555
|
# @example Response structure
|
@@ -445,21 +583,40 @@ module Aws::ServiceDiscovery
|
|
445
583
|
#
|
446
584
|
# * Optionally, a health check
|
447
585
|
#
|
448
|
-
# After you create the service, you can submit a RegisterInstance
|
586
|
+
# After you create the service, you can submit a [RegisterInstance][1]
|
449
587
|
# request, and AWS Cloud Map uses the values in the configuration to
|
450
588
|
# create the specified entities.
|
451
589
|
#
|
452
590
|
# For the current limit on the number of instances that you can register
|
453
591
|
# using the same namespace and using the same service, see [AWS Cloud
|
454
|
-
# Map Limits][
|
592
|
+
# Map Limits][2] in the *AWS Cloud Map Developer Guide*.
|
455
593
|
#
|
456
594
|
#
|
457
595
|
#
|
458
|
-
# [1]:
|
596
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html
|
597
|
+
# [2]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
459
598
|
#
|
460
599
|
# @option params [required, String] :name
|
461
600
|
# The name that you want to assign to the service.
|
462
601
|
#
|
602
|
+
# If you want AWS Cloud Map to create an SRV record when you register an
|
603
|
+
# instance, and if you're using a system that requires a specific SRV
|
604
|
+
# format, such as [HAProxy][1], specify the following for `Name`\:
|
605
|
+
#
|
606
|
+
# * Start the name with an underscore (\_), such as `_exampleservice`
|
607
|
+
#
|
608
|
+
# * End the name with *.\_protocol*, such as `._tcp`
|
609
|
+
#
|
610
|
+
# When you register an instance, AWS Cloud Map creates an SRV record and
|
611
|
+
# assigns a name to the record by concatenating the service name and the
|
612
|
+
# namespace name, for example:
|
613
|
+
#
|
614
|
+
# `_exampleservice._tcp.example.com`
|
615
|
+
#
|
616
|
+
#
|
617
|
+
#
|
618
|
+
# [1]: http://www.haproxy.org/
|
619
|
+
#
|
463
620
|
# @option params [String] :namespace_id
|
464
621
|
# The ID of the namespace that you want to use to create the service.
|
465
622
|
#
|
@@ -481,10 +638,10 @@ module Aws::ServiceDiscovery
|
|
481
638
|
# instance.
|
482
639
|
#
|
483
640
|
# @option params [Types::HealthCheckConfig] :health_check_config
|
484
|
-
# *Public DNS namespaces only.* A complex type that contains
|
485
|
-
# for an optional Route 53 health check. If you specify
|
486
|
-
# health check, AWS Cloud Map associates the health check
|
487
|
-
# Route 53 DNS records that you specify in `DnsConfig`.
|
641
|
+
# *Public DNS and HTTP namespaces only.* A complex type that contains
|
642
|
+
# settings for an optional Route 53 health check. If you specify
|
643
|
+
# settings for a health check, AWS Cloud Map associates the health check
|
644
|
+
# with all the Route 53 DNS records that you specify in `DnsConfig`.
|
488
645
|
#
|
489
646
|
# If you specify a health check configuration, you can specify either
|
490
647
|
# `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
|
@@ -503,10 +660,62 @@ module Aws::ServiceDiscovery
|
|
503
660
|
# If you specify a health check configuration, you can specify either
|
504
661
|
# `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
|
505
662
|
#
|
663
|
+
# You can't add, update, or delete a `HealthCheckCustomConfig`
|
664
|
+
# configuration from an existing service.
|
665
|
+
#
|
666
|
+
# @option params [Array<Types::Tag>] :tags
|
667
|
+
# The tags to add to the service. Each tag consists of a key and an
|
668
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
669
|
+
# character length of 128 characters, and tag values can have a maximum
|
670
|
+
# length of 256 characters.
|
671
|
+
#
|
506
672
|
# @return [Types::CreateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
507
673
|
#
|
508
674
|
# * {Types::CreateServiceResponse#service #service} => Types::Service
|
509
675
|
#
|
676
|
+
#
|
677
|
+
# @example Example: Example: Create service
|
678
|
+
#
|
679
|
+
# # Example: Create service
|
680
|
+
#
|
681
|
+
# resp = client.create_service({
|
682
|
+
# creator_request_id: "567c1193-6b00-4308-bd57-ad38a8822d25",
|
683
|
+
# dns_config: {
|
684
|
+
# dns_records: [
|
685
|
+
# {
|
686
|
+
# ttl: 60,
|
687
|
+
# type: "A",
|
688
|
+
# },
|
689
|
+
# ],
|
690
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
691
|
+
# routing_policy: "MULTIVALUE",
|
692
|
+
# },
|
693
|
+
# name: "myservice",
|
694
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
695
|
+
# })
|
696
|
+
#
|
697
|
+
# resp.to_h outputs the following:
|
698
|
+
# {
|
699
|
+
# service: {
|
700
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
|
701
|
+
# create_date: Time.parse(1587081768.334),
|
702
|
+
# creator_request_id: "567c1193-6b00-4308-bd57-ad38a8822d25",
|
703
|
+
# dns_config: {
|
704
|
+
# dns_records: [
|
705
|
+
# {
|
706
|
+
# ttl: 60,
|
707
|
+
# type: "A",
|
708
|
+
# },
|
709
|
+
# ],
|
710
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
711
|
+
# routing_policy: "MULTIVALUE",
|
712
|
+
# },
|
713
|
+
# id: "srv-p5zdwlg5uvvzjita",
|
714
|
+
# name: "myservice",
|
715
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
716
|
+
# },
|
717
|
+
# }
|
718
|
+
#
|
510
719
|
# @example Request syntax with placeholder values
|
511
720
|
#
|
512
721
|
# resp = client.create_service({
|
@@ -532,6 +741,12 @@ module Aws::ServiceDiscovery
|
|
532
741
|
# health_check_custom_config: {
|
533
742
|
# failure_threshold: 1,
|
534
743
|
# },
|
744
|
+
# tags: [
|
745
|
+
# {
|
746
|
+
# key: "TagKey", # required
|
747
|
+
# value: "TagValue", # required
|
748
|
+
# },
|
749
|
+
# ],
|
535
750
|
# })
|
536
751
|
#
|
537
752
|
# @example Response structure
|
@@ -573,6 +788,20 @@ module Aws::ServiceDiscovery
|
|
573
788
|
#
|
574
789
|
# * {Types::DeleteNamespaceResponse#operation_id #operation_id} => String
|
575
790
|
#
|
791
|
+
#
|
792
|
+
# @example Example: Example: Delete namespace
|
793
|
+
#
|
794
|
+
# # Example: Delete namespace
|
795
|
+
#
|
796
|
+
# resp = client.delete_namespace({
|
797
|
+
# id: "ns-ylexjili4cdxy3xm",
|
798
|
+
# })
|
799
|
+
#
|
800
|
+
# resp.to_h outputs the following:
|
801
|
+
# {
|
802
|
+
# operation_id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k98y6drk",
|
803
|
+
# }
|
804
|
+
#
|
576
805
|
# @example Request syntax with placeholder values
|
577
806
|
#
|
578
807
|
# resp = client.delete_namespace({
|
@@ -600,6 +829,19 @@ module Aws::ServiceDiscovery
|
|
600
829
|
#
|
601
830
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
602
831
|
#
|
832
|
+
#
|
833
|
+
# @example Example: Example: Delete service
|
834
|
+
#
|
835
|
+
# # Example: Delete service
|
836
|
+
#
|
837
|
+
# resp = client.delete_service({
|
838
|
+
# id: "srv-p5zdwlg5uvvzjita",
|
839
|
+
# })
|
840
|
+
#
|
841
|
+
# resp.to_h outputs the following:
|
842
|
+
# {
|
843
|
+
# }
|
844
|
+
#
|
603
845
|
# @example Request syntax with placeholder values
|
604
846
|
#
|
605
847
|
# resp = client.delete_service({
|
@@ -622,12 +864,32 @@ module Aws::ServiceDiscovery
|
|
622
864
|
# The ID of the service that the instance is associated with.
|
623
865
|
#
|
624
866
|
# @option params [required, String] :instance_id
|
625
|
-
# The value that you specified for `Id` in the RegisterInstance
|
867
|
+
# The value that you specified for `Id` in the [RegisterInstance][1]
|
868
|
+
# request.
|
869
|
+
#
|
870
|
+
#
|
871
|
+
#
|
872
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html
|
626
873
|
#
|
627
874
|
# @return [Types::DeregisterInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
628
875
|
#
|
629
876
|
# * {Types::DeregisterInstanceResponse#operation_id #operation_id} => String
|
630
877
|
#
|
878
|
+
#
|
879
|
+
# @example Example: Example: Deregister a service instance
|
880
|
+
#
|
881
|
+
# # Example: Deregister a service instance
|
882
|
+
#
|
883
|
+
# resp = client.deregister_instance({
|
884
|
+
# instance_id: "myservice-53",
|
885
|
+
# service_id: "srv-p5zdwlg5uvvzjita",
|
886
|
+
# })
|
887
|
+
#
|
888
|
+
# resp.to_h outputs the following:
|
889
|
+
# {
|
890
|
+
# operation_id: "4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq",
|
891
|
+
# }
|
892
|
+
#
|
631
893
|
# @example Request syntax with placeholder values
|
632
894
|
#
|
633
895
|
# resp = client.deregister_instance({
|
@@ -649,6 +911,9 @@ module Aws::ServiceDiscovery
|
|
649
911
|
end
|
650
912
|
|
651
913
|
# Discovers registered instances for a specified namespace and service.
|
914
|
+
# You can use `DiscoverInstances` to discover instances for any type of
|
915
|
+
# namespace. For public and private DNS namespaces, you can also use DNS
|
916
|
+
# queries to discover instances.
|
652
917
|
#
|
653
918
|
# @option params [required, String] :namespace_name
|
654
919
|
# The name of the namespace that you specified when you registered the
|
@@ -659,9 +924,10 @@ module Aws::ServiceDiscovery
|
|
659
924
|
# instance.
|
660
925
|
#
|
661
926
|
# @option params [Integer] :max_results
|
662
|
-
# The maximum number of instances that you want Cloud Map to return
|
663
|
-
# the response to a `DiscoverInstances` request. If you don't
|
664
|
-
# value for `MaxResults`, Cloud Map returns up to 100
|
927
|
+
# The maximum number of instances that you want AWS Cloud Map to return
|
928
|
+
# in the response to a `DiscoverInstances` request. If you don't
|
929
|
+
# specify a value for `MaxResults`, AWS Cloud Map returns up to 100
|
930
|
+
# instances.
|
665
931
|
#
|
666
932
|
# @option params [Hash<String,String>] :query_parameters
|
667
933
|
# A string map that contains attributes with values that you can use to
|
@@ -676,6 +942,34 @@ module Aws::ServiceDiscovery
|
|
676
942
|
#
|
677
943
|
# * {Types::DiscoverInstancesResponse#instances #instances} => Array<Types::HttpInstanceSummary>
|
678
944
|
#
|
945
|
+
#
|
946
|
+
# @example Example: Example: Discover registered instances
|
947
|
+
#
|
948
|
+
# # Example: Discover registered instances
|
949
|
+
#
|
950
|
+
# resp = client.discover_instances({
|
951
|
+
# health_status: "ALL",
|
952
|
+
# max_results: 10,
|
953
|
+
# namespace_name: "example.com",
|
954
|
+
# service_name: "myservice",
|
955
|
+
# })
|
956
|
+
#
|
957
|
+
# resp.to_h outputs the following:
|
958
|
+
# {
|
959
|
+
# instances: [
|
960
|
+
# {
|
961
|
+
# attributes: {
|
962
|
+
# "AWS_INSTANCE_IPV4" => "172.2.1.3",
|
963
|
+
# "AWS_INSTANCE_PORT" => "808",
|
964
|
+
# },
|
965
|
+
# health_status: "UNKNOWN",
|
966
|
+
# instance_id: "myservice-53",
|
967
|
+
# namespace_name: "example.com",
|
968
|
+
# service_name: "myservice",
|
969
|
+
# },
|
970
|
+
# ],
|
971
|
+
# }
|
972
|
+
#
|
679
973
|
# @example Request syntax with placeholder values
|
680
974
|
#
|
681
975
|
# resp = client.discover_instances({
|
@@ -719,6 +1013,30 @@ module Aws::ServiceDiscovery
|
|
719
1013
|
#
|
720
1014
|
# * {Types::GetInstanceResponse#instance #instance} => Types::Instance
|
721
1015
|
#
|
1016
|
+
#
|
1017
|
+
# @example Example: GetInstance example
|
1018
|
+
#
|
1019
|
+
# # This example gets information about a specified instance.
|
1020
|
+
#
|
1021
|
+
# resp = client.get_instance({
|
1022
|
+
# instance_id: "i-abcd1234",
|
1023
|
+
# service_id: "srv-e4anhexample0004",
|
1024
|
+
# })
|
1025
|
+
#
|
1026
|
+
# resp.to_h outputs the following:
|
1027
|
+
# {
|
1028
|
+
# instance: {
|
1029
|
+
# attributes: {
|
1030
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.44",
|
1031
|
+
# "AWS_INSTANCE_PORT" => "80",
|
1032
|
+
# "color" => "green",
|
1033
|
+
# "region" => "us-west-2",
|
1034
|
+
# "stage" => "beta",
|
1035
|
+
# },
|
1036
|
+
# id: "i-abcd1234",
|
1037
|
+
# },
|
1038
|
+
# }
|
1039
|
+
#
|
722
1040
|
# @example Request syntax with placeholder values
|
723
1041
|
#
|
724
1042
|
# resp = client.get_instance({
|
@@ -761,10 +1079,14 @@ module Aws::ServiceDiscovery
|
|
761
1079
|
# all the instances that are associated with the specified service.
|
762
1080
|
#
|
763
1081
|
# <note markdown="1"> To get the IDs for the instances that you've registered by using a
|
764
|
-
# specified service, submit a ListInstances request.
|
1082
|
+
# specified service, submit a [ListInstances][1] request.
|
765
1083
|
#
|
766
1084
|
# </note>
|
767
1085
|
#
|
1086
|
+
#
|
1087
|
+
#
|
1088
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html
|
1089
|
+
#
|
768
1090
|
# @option params [Integer] :max_results
|
769
1091
|
# The maximum number of instances that you want AWS Cloud Map to return
|
770
1092
|
# in the response to a `GetInstancesHealthStatus` request. If you don't
|
@@ -784,6 +1106,25 @@ module Aws::ServiceDiscovery
|
|
784
1106
|
# * {Types::GetInstancesHealthStatusResponse#status #status} => Hash<String,String>
|
785
1107
|
# * {Types::GetInstancesHealthStatusResponse#next_token #next_token} => String
|
786
1108
|
#
|
1109
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1110
|
+
#
|
1111
|
+
#
|
1112
|
+
# @example Example: GetInstancesHealthStatus example
|
1113
|
+
#
|
1114
|
+
# # This example gets the current health status of one or more instances that are associate with a specified service.
|
1115
|
+
#
|
1116
|
+
# resp = client.get_instances_health_status({
|
1117
|
+
# service_id: "srv-e4anhexample0004",
|
1118
|
+
# })
|
1119
|
+
#
|
1120
|
+
# resp.to_h outputs the following:
|
1121
|
+
# {
|
1122
|
+
# status: {
|
1123
|
+
# "i-abcd1234" => "HEALTHY",
|
1124
|
+
# "i-abcd1235" => "UNHEALTHY",
|
1125
|
+
# },
|
1126
|
+
# }
|
1127
|
+
#
|
787
1128
|
# @example Request syntax with placeholder values
|
788
1129
|
#
|
789
1130
|
# resp = client.get_instances_health_status({
|
@@ -817,6 +1158,35 @@ module Aws::ServiceDiscovery
|
|
817
1158
|
#
|
818
1159
|
# * {Types::GetNamespaceResponse#namespace #namespace} => Types::Namespace
|
819
1160
|
#
|
1161
|
+
#
|
1162
|
+
# @example Example: GetNamespace example
|
1163
|
+
#
|
1164
|
+
# # This example gets information about a specified namespace.
|
1165
|
+
#
|
1166
|
+
# resp = client.get_namespace({
|
1167
|
+
# id: "ns-e4anhexample0004",
|
1168
|
+
# })
|
1169
|
+
#
|
1170
|
+
# resp.to_h outputs the following:
|
1171
|
+
# {
|
1172
|
+
# namespace: {
|
1173
|
+
# arn: "arn:aws:servicediscovery:us-west-2: 123456789120:namespace/ns-e1tpmexample0001",
|
1174
|
+
# create_date: Time.parse("20181118T211712Z"),
|
1175
|
+
# creator_request_id: "example-creator-request-id-0001",
|
1176
|
+
# description: "Example.com AWS Cloud Map HTTP Namespace",
|
1177
|
+
# id: "ns-e1tpmexample0001",
|
1178
|
+
# name: "example-http.com",
|
1179
|
+
# properties: {
|
1180
|
+
# dns_properties: {
|
1181
|
+
# },
|
1182
|
+
# http_properties: {
|
1183
|
+
# http_name: "example-http.com",
|
1184
|
+
# },
|
1185
|
+
# },
|
1186
|
+
# type: "HTTP",
|
1187
|
+
# },
|
1188
|
+
# }
|
1189
|
+
#
|
820
1190
|
# @example Request syntax with placeholder values
|
821
1191
|
#
|
822
1192
|
# resp = client.get_namespace({
|
@@ -849,10 +1219,14 @@ module Aws::ServiceDiscovery
|
|
849
1219
|
# the response, such as a `CreateService` request.
|
850
1220
|
#
|
851
1221
|
# <note markdown="1"> To get a list of operations that match specified criteria, see
|
852
|
-
# ListOperations.
|
1222
|
+
# [ListOperations][1].
|
853
1223
|
#
|
854
1224
|
# </note>
|
855
1225
|
#
|
1226
|
+
#
|
1227
|
+
#
|
1228
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html
|
1229
|
+
#
|
856
1230
|
# @option params [required, String] :operation_id
|
857
1231
|
# The ID of the operation that you want to get more information about.
|
858
1232
|
#
|
@@ -860,6 +1234,29 @@ module Aws::ServiceDiscovery
|
|
860
1234
|
#
|
861
1235
|
# * {Types::GetOperationResponse#operation #operation} => Types::Operation
|
862
1236
|
#
|
1237
|
+
#
|
1238
|
+
# @example Example: Example: Get operation result
|
1239
|
+
#
|
1240
|
+
# # Example: Get operation result
|
1241
|
+
#
|
1242
|
+
# resp = client.get_operation({
|
1243
|
+
# operation_id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
|
1244
|
+
# })
|
1245
|
+
#
|
1246
|
+
# resp.to_h outputs the following:
|
1247
|
+
# {
|
1248
|
+
# operation: {
|
1249
|
+
# create_date: Time.parse(1587055860.121),
|
1250
|
+
# id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
|
1251
|
+
# status: "SUCCESS",
|
1252
|
+
# targets: {
|
1253
|
+
# "NAMESPACE" => "ns-ylexjili4cdxy3xm",
|
1254
|
+
# },
|
1255
|
+
# type: "CREATE_NAMESPACE",
|
1256
|
+
# update_date: Time.parse(1587055900.469),
|
1257
|
+
# },
|
1258
|
+
# }
|
1259
|
+
#
|
863
1260
|
# @example Request syntax with placeholder values
|
864
1261
|
#
|
865
1262
|
# resp = client.get_operation({
|
@@ -896,6 +1293,33 @@ module Aws::ServiceDiscovery
|
|
896
1293
|
#
|
897
1294
|
# * {Types::GetServiceResponse#service #service} => Types::Service
|
898
1295
|
#
|
1296
|
+
#
|
1297
|
+
# @example Example: GetService Example
|
1298
|
+
#
|
1299
|
+
# # This example gets the settings for a specified service.
|
1300
|
+
#
|
1301
|
+
# resp = client.get_service({
|
1302
|
+
# id: "srv-e4anhexample0004",
|
1303
|
+
# })
|
1304
|
+
#
|
1305
|
+
# resp.to_h outputs the following:
|
1306
|
+
# {
|
1307
|
+
# service: {
|
1308
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789120:service/srv-e4anhexample0004",
|
1309
|
+
# create_date: Time.parse("20181118T211707Z"),
|
1310
|
+
# creator_request_id: "example-creator-request-id-0004",
|
1311
|
+
# description: "Example.com AWS Cloud Map HTTP Service",
|
1312
|
+
# health_check_config: {
|
1313
|
+
# failure_threshold: 3,
|
1314
|
+
# resource_path: "/",
|
1315
|
+
# type: "HTTPS",
|
1316
|
+
# },
|
1317
|
+
# id: "srv-e4anhexample0004",
|
1318
|
+
# name: "example-http-service",
|
1319
|
+
# namespace_id: "ns-e4anhexample0004",
|
1320
|
+
# },
|
1321
|
+
# }
|
1322
|
+
#
|
899
1323
|
# @example Request syntax with placeholder values
|
900
1324
|
#
|
901
1325
|
# resp = client.get_service({
|
@@ -955,6 +1379,30 @@ module Aws::ServiceDiscovery
|
|
955
1379
|
# * {Types::ListInstancesResponse#instances #instances} => Array<Types::InstanceSummary>
|
956
1380
|
# * {Types::ListInstancesResponse#next_token #next_token} => String
|
957
1381
|
#
|
1382
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1383
|
+
#
|
1384
|
+
#
|
1385
|
+
# @example Example: Example: List service instances
|
1386
|
+
#
|
1387
|
+
# # Example: List service instances
|
1388
|
+
#
|
1389
|
+
# resp = client.list_instances({
|
1390
|
+
# service_id: "srv-qzpwvt2tfqcegapy",
|
1391
|
+
# })
|
1392
|
+
#
|
1393
|
+
# resp.to_h outputs the following:
|
1394
|
+
# {
|
1395
|
+
# instances: [
|
1396
|
+
# {
|
1397
|
+
# attributes: {
|
1398
|
+
# "AWS_INSTANCE_IPV4" => "172.2.1.3",
|
1399
|
+
# "AWS_INSTANCE_PORT" => "808",
|
1400
|
+
# },
|
1401
|
+
# id: "i-06bdabbae60f65a4e",
|
1402
|
+
# },
|
1403
|
+
# ],
|
1404
|
+
# }
|
1405
|
+
#
|
958
1406
|
# @example Request syntax with placeholder values
|
959
1407
|
#
|
960
1408
|
# resp = client.list_instances({
|
@@ -1015,6 +1463,67 @@ module Aws::ServiceDiscovery
|
|
1015
1463
|
# * {Types::ListNamespacesResponse#namespaces #namespaces} => Array<Types::NamespaceSummary>
|
1016
1464
|
# * {Types::ListNamespacesResponse#next_token #next_token} => String
|
1017
1465
|
#
|
1466
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1467
|
+
#
|
1468
|
+
#
|
1469
|
+
# @example Example: Example: List namespaces
|
1470
|
+
#
|
1471
|
+
# # Example: List namespaces
|
1472
|
+
#
|
1473
|
+
# resp = client.list_namespaces({
|
1474
|
+
# })
|
1475
|
+
#
|
1476
|
+
# resp.to_h outputs the following:
|
1477
|
+
# {
|
1478
|
+
# namespaces: [
|
1479
|
+
# {
|
1480
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-a3ccy2e7e3a7rile",
|
1481
|
+
# create_date: Time.parse(1585354387.357),
|
1482
|
+
# id: "ns-a3ccy2e7e3a7rile",
|
1483
|
+
# name: "local",
|
1484
|
+
# properties: {
|
1485
|
+
# dns_properties: {
|
1486
|
+
# hosted_zone_id: "Z06752353VBUDTC32S84S",
|
1487
|
+
# },
|
1488
|
+
# http_properties: {
|
1489
|
+
# http_name: "local",
|
1490
|
+
# },
|
1491
|
+
# },
|
1492
|
+
# type: "DNS_PRIVATE",
|
1493
|
+
# },
|
1494
|
+
# {
|
1495
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-pocfyjtrsmwtvcxx",
|
1496
|
+
# create_date: Time.parse(1586468974.698),
|
1497
|
+
# description: "My second namespace",
|
1498
|
+
# id: "ns-pocfyjtrsmwtvcxx",
|
1499
|
+
# name: "My-second-namespace",
|
1500
|
+
# properties: {
|
1501
|
+
# dns_properties: {
|
1502
|
+
# },
|
1503
|
+
# http_properties: {
|
1504
|
+
# http_name: "My-second-namespace",
|
1505
|
+
# },
|
1506
|
+
# },
|
1507
|
+
# type: "HTTP",
|
1508
|
+
# },
|
1509
|
+
# {
|
1510
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
1511
|
+
# create_date: Time.parse(1587055896.798),
|
1512
|
+
# id: "ns-ylexjili4cdxy3xm",
|
1513
|
+
# name: "example.com",
|
1514
|
+
# properties: {
|
1515
|
+
# dns_properties: {
|
1516
|
+
# hosted_zone_id: "Z09983722P0QME1B3KC8I",
|
1517
|
+
# },
|
1518
|
+
# http_properties: {
|
1519
|
+
# http_name: "example.com",
|
1520
|
+
# },
|
1521
|
+
# },
|
1522
|
+
# type: "DNS_PRIVATE",
|
1523
|
+
# },
|
1524
|
+
# ],
|
1525
|
+
# }
|
1526
|
+
#
|
1018
1527
|
# @example Request syntax with placeholder values
|
1019
1528
|
#
|
1020
1529
|
# resp = client.list_namespaces({
|
@@ -1087,6 +1596,44 @@ module Aws::ServiceDiscovery
|
|
1087
1596
|
# * {Types::ListOperationsResponse#operations #operations} => Array<Types::OperationSummary>
|
1088
1597
|
# * {Types::ListOperationsResponse#next_token #next_token} => String
|
1089
1598
|
#
|
1599
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1600
|
+
#
|
1601
|
+
#
|
1602
|
+
# @example Example: ListOperations Example
|
1603
|
+
#
|
1604
|
+
# # This example gets the operations that have a STATUS of either PENDING or SUCCESS.
|
1605
|
+
#
|
1606
|
+
# resp = client.list_operations({
|
1607
|
+
# filters: [
|
1608
|
+
# {
|
1609
|
+
# condition: "IN",
|
1610
|
+
# name: "STATUS",
|
1611
|
+
# values: [
|
1612
|
+
# "PENDING",
|
1613
|
+
# "SUCCESS",
|
1614
|
+
# ],
|
1615
|
+
# },
|
1616
|
+
# ],
|
1617
|
+
# })
|
1618
|
+
#
|
1619
|
+
# resp.to_h outputs the following:
|
1620
|
+
# {
|
1621
|
+
# operations: [
|
1622
|
+
# {
|
1623
|
+
# id: "76yy8ovhpdz0plmjzbsnqgnrqvpv2qdt-kexample",
|
1624
|
+
# status: "SUCCESS",
|
1625
|
+
# },
|
1626
|
+
# {
|
1627
|
+
# id: "prysnyzpji3u2ciy45nke83x2zanl7yk-dexample",
|
1628
|
+
# status: "SUCCESS",
|
1629
|
+
# },
|
1630
|
+
# {
|
1631
|
+
# id: "ko4ekftir7kzlbechsh7xvcdgcpk66gh-7example",
|
1632
|
+
# status: "PENDING",
|
1633
|
+
# },
|
1634
|
+
# ],
|
1635
|
+
# }
|
1636
|
+
#
|
1090
1637
|
# @example Request syntax with placeholder values
|
1091
1638
|
#
|
1092
1639
|
# resp = client.list_operations({
|
@@ -1152,6 +1699,37 @@ module Aws::ServiceDiscovery
|
|
1152
1699
|
# * {Types::ListServicesResponse#services #services} => Array<Types::ServiceSummary>
|
1153
1700
|
# * {Types::ListServicesResponse#next_token #next_token} => String
|
1154
1701
|
#
|
1702
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1703
|
+
#
|
1704
|
+
#
|
1705
|
+
# @example Example: Example: List services
|
1706
|
+
#
|
1707
|
+
# # Example: List services
|
1708
|
+
#
|
1709
|
+
# resp = client.list_services({
|
1710
|
+
# })
|
1711
|
+
#
|
1712
|
+
# resp.to_h outputs the following:
|
1713
|
+
# {
|
1714
|
+
# services: [
|
1715
|
+
# {
|
1716
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
|
1717
|
+
# create_date: Time.parse(1587081768.334),
|
1718
|
+
# dns_config: {
|
1719
|
+
# dns_records: [
|
1720
|
+
# {
|
1721
|
+
# ttl: 60,
|
1722
|
+
# type: "A",
|
1723
|
+
# },
|
1724
|
+
# ],
|
1725
|
+
# routing_policy: "MULTIVALUE",
|
1726
|
+
# },
|
1727
|
+
# id: "srv-p5zdwlg5uvvzjita",
|
1728
|
+
# name: "myservice",
|
1729
|
+
# },
|
1730
|
+
# ],
|
1731
|
+
# }
|
1732
|
+
#
|
1155
1733
|
# @example Request syntax with placeholder values
|
1156
1734
|
#
|
1157
1735
|
# resp = client.list_services({
|
@@ -1195,6 +1773,60 @@ module Aws::ServiceDiscovery
|
|
1195
1773
|
req.send_request(options)
|
1196
1774
|
end
|
1197
1775
|
|
1776
|
+
# Lists tags for the specified resource.
|
1777
|
+
#
|
1778
|
+
# @option params [required, String] :resource_arn
|
1779
|
+
# The Amazon Resource Name (ARN) of the resource that you want to
|
1780
|
+
# retrieve tags for.
|
1781
|
+
#
|
1782
|
+
# @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1783
|
+
#
|
1784
|
+
# * {Types::ListTagsForResourceResponse#tags #tags} => Array<Types::Tag>
|
1785
|
+
#
|
1786
|
+
#
|
1787
|
+
# @example Example: ListTagsForResource example
|
1788
|
+
#
|
1789
|
+
# # This example lists the tags of a resource.
|
1790
|
+
#
|
1791
|
+
# resp = client.list_tags_for_resource({
|
1792
|
+
# resource_arn: "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
1793
|
+
# })
|
1794
|
+
#
|
1795
|
+
# resp.to_h outputs the following:
|
1796
|
+
# {
|
1797
|
+
# tags: [
|
1798
|
+
# {
|
1799
|
+
# key: "Project",
|
1800
|
+
# value: "Zeta",
|
1801
|
+
# },
|
1802
|
+
# {
|
1803
|
+
# key: "Department",
|
1804
|
+
# value: "Engineering",
|
1805
|
+
# },
|
1806
|
+
# ],
|
1807
|
+
# }
|
1808
|
+
#
|
1809
|
+
# @example Request syntax with placeholder values
|
1810
|
+
#
|
1811
|
+
# resp = client.list_tags_for_resource({
|
1812
|
+
# resource_arn: "AmazonResourceName", # required
|
1813
|
+
# })
|
1814
|
+
#
|
1815
|
+
# @example Response structure
|
1816
|
+
#
|
1817
|
+
# resp.tags #=> Array
|
1818
|
+
# resp.tags[0].key #=> String
|
1819
|
+
# resp.tags[0].value #=> String
|
1820
|
+
#
|
1821
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListTagsForResource AWS API Documentation
|
1822
|
+
#
|
1823
|
+
# @overload list_tags_for_resource(params = {})
|
1824
|
+
# @param [Hash] params ({})
|
1825
|
+
def list_tags_for_resource(params = {}, options = {})
|
1826
|
+
req = build_request(:list_tags_for_resource, params)
|
1827
|
+
req.send_request(options)
|
1828
|
+
end
|
1829
|
+
|
1198
1830
|
# Creates or updates one or more records and, optionally, creates a
|
1199
1831
|
# health check based on the settings in a specified service. When you
|
1200
1832
|
# submit a `RegisterInstance` request, the following occurs:
|
@@ -1212,7 +1844,7 @@ module Aws::ServiceDiscovery
|
|
1212
1844
|
# One `RegisterInstance` request must complete before you can submit
|
1213
1845
|
# another request and specify the same service ID and instance ID.
|
1214
1846
|
#
|
1215
|
-
# For more information, see CreateService.
|
1847
|
+
# For more information, see [CreateService][1].
|
1216
1848
|
#
|
1217
1849
|
# When AWS Cloud Map receives a DNS query for the specified DNS name, it
|
1218
1850
|
# returns the applicable value:
|
@@ -1227,11 +1859,12 @@ module Aws::ServiceDiscovery
|
|
1227
1859
|
#
|
1228
1860
|
# For the current limit on the number of instances that you can register
|
1229
1861
|
# using the same namespace and using the same service, see [AWS Cloud
|
1230
|
-
# Map Limits][
|
1862
|
+
# Map Limits][2] in the *AWS Cloud Map Developer Guide*.
|
1231
1863
|
#
|
1232
1864
|
#
|
1233
1865
|
#
|
1234
|
-
# [1]:
|
1866
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html
|
1867
|
+
# [2]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
1235
1868
|
#
|
1236
1869
|
# @option params [required, String] :service_id
|
1237
1870
|
# The ID of the service that you want to use for settings for the
|
@@ -1244,7 +1877,7 @@ module Aws::ServiceDiscovery
|
|
1244
1877
|
# * If the service that is specified by `ServiceId` includes settings
|
1245
1878
|
# for an SRV record, the value of `InstanceId` is automatically
|
1246
1879
|
# included as part of the value for the SRV record. For more
|
1247
|
-
# information, see DnsRecord
|
1880
|
+
# information, see [DnsRecord > Type][1].
|
1248
1881
|
#
|
1249
1882
|
# * You can use this value to update an existing instance.
|
1250
1883
|
#
|
@@ -1261,6 +1894,10 @@ module Aws::ServiceDiscovery
|
|
1261
1894
|
#
|
1262
1895
|
# </note>
|
1263
1896
|
#
|
1897
|
+
#
|
1898
|
+
#
|
1899
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type
|
1900
|
+
#
|
1264
1901
|
# @option params [String] :creator_request_id
|
1265
1902
|
# A unique string that identifies the request and that allows failed
|
1266
1903
|
# `RegisterInstance` requests to be retried without the risk of
|
@@ -1360,23 +1997,45 @@ module Aws::ServiceDiscovery
|
|
1360
1997
|
# If the service includes `HealthCheckConfig`, the port on the endpoint
|
1361
1998
|
# that you want Route 53 to send requests to.
|
1362
1999
|
#
|
1363
|
-
# This value is required if you specified settings for an SRV record
|
1364
|
-
# when you created the service.
|
2000
|
+
# This value is required if you specified settings for an SRV record or
|
2001
|
+
# a Route 53 health check when you created the service.
|
1365
2002
|
#
|
1366
2003
|
# **Custom attributes**
|
1367
2004
|
#
|
1368
2005
|
# You can add up to 30 custom attributes. For each key-value pair, the
|
1369
2006
|
# maximum length of the attribute name is 255 characters, and the
|
1370
|
-
# maximum length of the attribute value is 1,024 characters.
|
2007
|
+
# maximum length of the attribute value is 1,024 characters. Total size
|
2008
|
+
# of all provided attributes (sum of all keys and values) must not
|
2009
|
+
# exceed 5,000 characters.
|
1371
2010
|
#
|
1372
2011
|
#
|
1373
2012
|
#
|
1374
|
-
# [1]:
|
2013
|
+
# [1]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html
|
1375
2014
|
#
|
1376
2015
|
# @return [Types::RegisterInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1377
2016
|
#
|
1378
2017
|
# * {Types::RegisterInstanceResponse#operation_id #operation_id} => String
|
1379
2018
|
#
|
2019
|
+
#
|
2020
|
+
# @example Example: Example: Register Instance
|
2021
|
+
#
|
2022
|
+
# # Example: Register Instance
|
2023
|
+
#
|
2024
|
+
# resp = client.register_instance({
|
2025
|
+
# attributes: {
|
2026
|
+
# "AWS_INSTANCE_IPV4" => "172.2.1.3",
|
2027
|
+
# "AWS_INSTANCE_PORT" => "808",
|
2028
|
+
# },
|
2029
|
+
# creator_request_id: "7a48a98a-72e6-4849-bfa7-1a458e030d7b",
|
2030
|
+
# instance_id: "myservice-53",
|
2031
|
+
# service_id: "srv-p5zdwlg5uvvzjita",
|
2032
|
+
# })
|
2033
|
+
#
|
2034
|
+
# resp.to_h outputs the following:
|
2035
|
+
# {
|
2036
|
+
# operation_id: "4yejorelbukcjzpnr6tlmrghsjwpngf4-k95yg2u7",
|
2037
|
+
# }
|
2038
|
+
#
|
1380
2039
|
# @example Request syntax with placeholder values
|
1381
2040
|
#
|
1382
2041
|
# resp = client.register_instance({
|
@@ -1401,6 +2060,107 @@ module Aws::ServiceDiscovery
|
|
1401
2060
|
req.send_request(options)
|
1402
2061
|
end
|
1403
2062
|
|
2063
|
+
# Adds one or more tags to the specified resource.
|
2064
|
+
#
|
2065
|
+
# @option params [required, String] :resource_arn
|
2066
|
+
# The Amazon Resource Name (ARN) of the resource that you want to
|
2067
|
+
# retrieve tags for.
|
2068
|
+
#
|
2069
|
+
# @option params [required, Array<Types::Tag>] :tags
|
2070
|
+
# The tags to add to the specified resource. Specifying the tag key is
|
2071
|
+
# required. You can set the value of a tag to an empty string, but you
|
2072
|
+
# can't set the value of a tag to null.
|
2073
|
+
#
|
2074
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2075
|
+
#
|
2076
|
+
#
|
2077
|
+
# @example Example: TagResource example
|
2078
|
+
#
|
2079
|
+
# # This example adds "Department" and "Project" tags to a resource.
|
2080
|
+
#
|
2081
|
+
# resp = client.tag_resource({
|
2082
|
+
# resource_arn: "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
2083
|
+
# tags: [
|
2084
|
+
# {
|
2085
|
+
# key: "Department",
|
2086
|
+
# value: "Engineering",
|
2087
|
+
# },
|
2088
|
+
# {
|
2089
|
+
# key: "Project",
|
2090
|
+
# value: "Zeta",
|
2091
|
+
# },
|
2092
|
+
# ],
|
2093
|
+
# })
|
2094
|
+
#
|
2095
|
+
# resp.to_h outputs the following:
|
2096
|
+
# {
|
2097
|
+
# }
|
2098
|
+
#
|
2099
|
+
# @example Request syntax with placeholder values
|
2100
|
+
#
|
2101
|
+
# resp = client.tag_resource({
|
2102
|
+
# resource_arn: "AmazonResourceName", # required
|
2103
|
+
# tags: [ # required
|
2104
|
+
# {
|
2105
|
+
# key: "TagKey", # required
|
2106
|
+
# value: "TagValue", # required
|
2107
|
+
# },
|
2108
|
+
# ],
|
2109
|
+
# })
|
2110
|
+
#
|
2111
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/TagResource AWS API Documentation
|
2112
|
+
#
|
2113
|
+
# @overload tag_resource(params = {})
|
2114
|
+
# @param [Hash] params ({})
|
2115
|
+
def tag_resource(params = {}, options = {})
|
2116
|
+
req = build_request(:tag_resource, params)
|
2117
|
+
req.send_request(options)
|
2118
|
+
end
|
2119
|
+
|
2120
|
+
# Removes one or more tags from the specified resource.
|
2121
|
+
#
|
2122
|
+
# @option params [required, String] :resource_arn
|
2123
|
+
# The Amazon Resource Name (ARN) of the resource that you want to
|
2124
|
+
# retrieve tags for.
|
2125
|
+
#
|
2126
|
+
# @option params [required, Array<String>] :tag_keys
|
2127
|
+
# The tag keys to remove from the specified resource.
|
2128
|
+
#
|
2129
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2130
|
+
#
|
2131
|
+
#
|
2132
|
+
# @example Example: UntagResource example
|
2133
|
+
#
|
2134
|
+
# # This example removes the "Department" and "Project" tags from a resource.
|
2135
|
+
#
|
2136
|
+
# resp = client.untag_resource({
|
2137
|
+
# resource_arn: "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
2138
|
+
# tag_keys: [
|
2139
|
+
# "Project",
|
2140
|
+
# "Department",
|
2141
|
+
# ],
|
2142
|
+
# })
|
2143
|
+
#
|
2144
|
+
# resp.to_h outputs the following:
|
2145
|
+
# {
|
2146
|
+
# }
|
2147
|
+
#
|
2148
|
+
# @example Request syntax with placeholder values
|
2149
|
+
#
|
2150
|
+
# resp = client.untag_resource({
|
2151
|
+
# resource_arn: "AmazonResourceName", # required
|
2152
|
+
# tag_keys: ["TagKey"], # required
|
2153
|
+
# })
|
2154
|
+
#
|
2155
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UntagResource AWS API Documentation
|
2156
|
+
#
|
2157
|
+
# @overload untag_resource(params = {})
|
2158
|
+
# @param [Hash] params ({})
|
2159
|
+
def untag_resource(params = {}, options = {})
|
2160
|
+
req = build_request(:untag_resource, params)
|
2161
|
+
req.send_request(options)
|
2162
|
+
end
|
2163
|
+
|
1404
2164
|
# Submits a request to change the health status of a custom health check
|
1405
2165
|
# to healthy or unhealthy.
|
1406
2166
|
#
|
@@ -1410,7 +2170,11 @@ module Aws::ServiceDiscovery
|
|
1410
2170
|
# to change the status for Route 53 health checks, which you define
|
1411
2171
|
# using `HealthCheckConfig`.
|
1412
2172
|
#
|
1413
|
-
# For more information, see HealthCheckCustomConfig.
|
2173
|
+
# For more information, see [HealthCheckCustomConfig][1].
|
2174
|
+
#
|
2175
|
+
#
|
2176
|
+
#
|
2177
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
|
1414
2178
|
#
|
1415
2179
|
# @option params [required, String] :service_id
|
1416
2180
|
# The ID of the service that includes the configuration for the custom
|
@@ -1424,6 +2188,18 @@ module Aws::ServiceDiscovery
|
|
1424
2188
|
#
|
1425
2189
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1426
2190
|
#
|
2191
|
+
#
|
2192
|
+
# @example Example: UpdateInstanceCustomHealthStatus Example
|
2193
|
+
#
|
2194
|
+
# # This example submits a request to change the health status of an instance associated with a service with a custom health
|
2195
|
+
# # check to HEALTHY.
|
2196
|
+
#
|
2197
|
+
# resp = client.update_instance_custom_health_status({
|
2198
|
+
# instance_id: "i-abcd1234",
|
2199
|
+
# service_id: "srv-e4anhexample0004",
|
2200
|
+
# status: "HEALTHY",
|
2201
|
+
# })
|
2202
|
+
#
|
1427
2203
|
# @example Request syntax with placeholder values
|
1428
2204
|
#
|
1429
2205
|
# resp = client.update_instance_custom_health_status({
|
@@ -1443,21 +2219,28 @@ module Aws::ServiceDiscovery
|
|
1443
2219
|
|
1444
2220
|
# Submits a request to perform the following operations:
|
1445
2221
|
#
|
1446
|
-
# * Add or delete `DnsRecords` configurations
|
1447
|
-
#
|
1448
2222
|
# * Update the TTL setting for existing `DnsRecords` configurations
|
1449
2223
|
#
|
1450
2224
|
# * Add, update, or delete `HealthCheckConfig` for a specified service
|
1451
2225
|
#
|
1452
|
-
#
|
1453
|
-
#
|
1454
|
-
#
|
1455
|
-
#
|
1456
|
-
#
|
2226
|
+
# <note markdown="1"> You can't add, update, or delete a `HealthCheckCustomConfig`
|
2227
|
+
# configuration.
|
2228
|
+
#
|
2229
|
+
# </note>
|
2230
|
+
#
|
2231
|
+
# For public and private DNS namespaces, note the following:
|
2232
|
+
#
|
2233
|
+
# * If you omit any existing `DnsRecords` or `HealthCheckConfig`
|
2234
|
+
# configurations from an `UpdateService` request, the configurations
|
2235
|
+
# are deleted from the service.
|
2236
|
+
#
|
2237
|
+
# * If you omit an existing `HealthCheckCustomConfig` configuration from
|
2238
|
+
# an `UpdateService` request, the configuration is not deleted from
|
2239
|
+
# the service.
|
1457
2240
|
#
|
1458
|
-
# When you update
|
1459
|
-
#
|
1460
|
-
#
|
2241
|
+
# When you update settings for a service, AWS Cloud Map also updates the
|
2242
|
+
# corresponding settings in all the records and health checks that were
|
2243
|
+
# created by using the specified service.
|
1461
2244
|
#
|
1462
2245
|
# @option params [required, String] :id
|
1463
2246
|
# The ID of the service that you want to update.
|
@@ -1469,13 +2252,42 @@ module Aws::ServiceDiscovery
|
|
1469
2252
|
#
|
1470
2253
|
# * {Types::UpdateServiceResponse#operation_id #operation_id} => String
|
1471
2254
|
#
|
2255
|
+
#
|
2256
|
+
# @example Example: UpdateService Example
|
2257
|
+
#
|
2258
|
+
# # This example submits a request to replace the DnsConfig and HealthCheckConfig settings of a specified service.
|
2259
|
+
#
|
2260
|
+
# resp = client.update_service({
|
2261
|
+
# id: "srv-e4anhexample0004",
|
2262
|
+
# service: {
|
2263
|
+
# dns_config: {
|
2264
|
+
# dns_records: [
|
2265
|
+
# {
|
2266
|
+
# ttl: 60,
|
2267
|
+
# type: "A",
|
2268
|
+
# },
|
2269
|
+
# ],
|
2270
|
+
# },
|
2271
|
+
# health_check_config: {
|
2272
|
+
# failure_threshold: 2,
|
2273
|
+
# resource_path: "/",
|
2274
|
+
# type: "HTTP",
|
2275
|
+
# },
|
2276
|
+
# },
|
2277
|
+
# })
|
2278
|
+
#
|
2279
|
+
# resp.to_h outputs the following:
|
2280
|
+
# {
|
2281
|
+
# operation_id: "m35hsdrkxwjffm3xef4bxyy6vc3ewakx-jdn3y5g5",
|
2282
|
+
# }
|
2283
|
+
#
|
1472
2284
|
# @example Request syntax with placeholder values
|
1473
2285
|
#
|
1474
2286
|
# resp = client.update_service({
|
1475
2287
|
# id: "ResourceId", # required
|
1476
2288
|
# service: { # required
|
1477
2289
|
# description: "ResourceDescription",
|
1478
|
-
# dns_config: {
|
2290
|
+
# dns_config: {
|
1479
2291
|
# dns_records: [ # required
|
1480
2292
|
# {
|
1481
2293
|
# type: "SRV", # required, accepts SRV, A, AAAA, CNAME
|
@@ -1517,7 +2329,7 @@ module Aws::ServiceDiscovery
|
|
1517
2329
|
params: params,
|
1518
2330
|
config: config)
|
1519
2331
|
context[:gem_name] = 'aws-sdk-servicediscovery'
|
1520
|
-
context[:gem_version] = '1.
|
2332
|
+
context[:gem_version] = '1.24.0'
|
1521
2333
|
Seahorse::Client::Request.new(handlers, context)
|
1522
2334
|
end
|
1523
2335
|
|