aws-sdk-servicediscovery 1.20.0 → 1.25.1
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 +1 -1
- data/lib/aws-sdk-servicediscovery/client.rb +820 -57
- data/lib/aws-sdk-servicediscovery/client_api.rb +94 -2
- data/lib/aws-sdk-servicediscovery/errors.rb +53 -0
- data/lib/aws-sdk-servicediscovery/resource.rb +1 -7
- data/lib/aws-sdk-servicediscovery/types.rb +445 -107
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0bb3a22273fcc871a3e3200f28a9304852b5472d48f86d24af4dc1933878e46c
|
4
|
+
data.tar.gz: 3a7af313fe058ba361904b640a7a57a63d594f7d2ffcd28efe8a40f9b63e021c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51868392fe4c86b81acdd15fbbcc4e66a5a50812040dc52def844c62bcc22e2e50a0fd611d729c161efe1474f69c3d7505046a1926469548cc70e86ba0dfd64c
|
7
|
+
data.tar.gz: cbcfc66ec0e660f373f09c264c4c9a9883ba9d0f1a8d14cedfadeb2b0276eb8c1f042ffbcd79c288a6a399613cbc4de93c505f5eafe49f91fba56c90f554424a
|
@@ -24,6 +24,7 @@ require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
|
24
24
|
require 'aws-sdk-core/plugins/client_metrics_plugin.rb'
|
25
25
|
require 'aws-sdk-core/plugins/client_metrics_send_plugin.rb'
|
26
26
|
require 'aws-sdk-core/plugins/transfer_encoding.rb'
|
27
|
+
require 'aws-sdk-core/plugins/http_checksum.rb'
|
27
28
|
require 'aws-sdk-core/plugins/signature_v4.rb'
|
28
29
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
29
30
|
|
@@ -32,11 +33,11 @@ Aws::Plugins::GlobalConfiguration.add_identifier(:servicediscovery)
|
|
32
33
|
module Aws::ServiceDiscovery
|
33
34
|
# An API client for ServiceDiscovery. To construct a client, you need to configure a `:region` and `:credentials`.
|
34
35
|
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
36
|
+
# client = Aws::ServiceDiscovery::Client.new(
|
37
|
+
# region: region_name,
|
38
|
+
# credentials: credentials,
|
39
|
+
# # ...
|
40
|
+
# )
|
40
41
|
#
|
41
42
|
# For details on configuring region and credentials see
|
42
43
|
# the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).
|
@@ -69,6 +70,7 @@ module Aws::ServiceDiscovery
|
|
69
70
|
add_plugin(Aws::Plugins::ClientMetricsPlugin)
|
70
71
|
add_plugin(Aws::Plugins::ClientMetricsSendPlugin)
|
71
72
|
add_plugin(Aws::Plugins::TransferEncoding)
|
73
|
+
add_plugin(Aws::Plugins::HttpChecksum)
|
72
74
|
add_plugin(Aws::Plugins::SignatureV4)
|
73
75
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
74
76
|
|
@@ -105,7 +107,7 @@ module Aws::ServiceDiscovery
|
|
105
107
|
# @option options [required, String] :region
|
106
108
|
# The AWS region to connect to. The configured `:region` is
|
107
109
|
# used to determine the service `:endpoint`. When not passed,
|
108
|
-
# a default `:region` is
|
110
|
+
# a default `:region` is searched for in the following locations:
|
109
111
|
#
|
110
112
|
# * `Aws.config[:region]`
|
111
113
|
# * `ENV['AWS_REGION']`
|
@@ -161,7 +163,7 @@ module Aws::ServiceDiscovery
|
|
161
163
|
# @option options [String] :endpoint
|
162
164
|
# The client endpoint is normally constructed from the `:region`
|
163
165
|
# option. You should only configure an `:endpoint` when connecting
|
164
|
-
# to test endpoints. This should be
|
166
|
+
# to test or custom endpoints. This should be a valid HTTP(S) URI.
|
165
167
|
#
|
166
168
|
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
167
169
|
# Used for the maximum size limit of the LRU cache storing endpoints data
|
@@ -176,7 +178,7 @@ module Aws::ServiceDiscovery
|
|
176
178
|
# requests fetching endpoints information. Defaults to 60 sec.
|
177
179
|
#
|
178
180
|
# @option options [Boolean] :endpoint_discovery (false)
|
179
|
-
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
181
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available.
|
180
182
|
#
|
181
183
|
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
182
184
|
# The log formatter.
|
@@ -229,15 +231,19 @@ module Aws::ServiceDiscovery
|
|
229
231
|
#
|
230
232
|
# @option options [String] :retry_mode ("legacy")
|
231
233
|
# Specifies which retry algorithm to use. Values are:
|
232
|
-
#
|
233
|
-
#
|
234
|
-
#
|
235
|
-
#
|
236
|
-
#
|
237
|
-
#
|
238
|
-
#
|
239
|
-
#
|
240
|
-
#
|
234
|
+
#
|
235
|
+
# * `legacy` - The pre-existing retry behavior. This is default value if
|
236
|
+
# no retry mode is provided.
|
237
|
+
#
|
238
|
+
# * `standard` - A standardized set of retry rules across the AWS SDKs.
|
239
|
+
# This includes support for retry quotas, which limit the number of
|
240
|
+
# unsuccessful retries a client can make.
|
241
|
+
#
|
242
|
+
# * `adaptive` - An experimental retry mode that includes all the
|
243
|
+
# functionality of `standard` mode along with automatic client side
|
244
|
+
# throttling. This is a provisional mode that may change behavior
|
245
|
+
# in the future.
|
246
|
+
#
|
241
247
|
#
|
242
248
|
# @option options [String] :secret_access_key
|
243
249
|
#
|
@@ -275,8 +281,7 @@ module Aws::ServiceDiscovery
|
|
275
281
|
#
|
276
282
|
# @option options [Integer] :http_read_timeout (60) The default
|
277
283
|
# number of seconds to wait for response data. This value can
|
278
|
-
# safely be set
|
279
|
-
# per-request on the session yielded by {#session_for}.
|
284
|
+
# safely be set per-request on the session.
|
280
285
|
#
|
281
286
|
# @option options [Float] :http_idle_timeout (5) The number of
|
282
287
|
# seconds a connection is allowed to sit idle before it is
|
@@ -288,7 +293,7 @@ module Aws::ServiceDiscovery
|
|
288
293
|
# request body. This option has no effect unless the request has
|
289
294
|
# "Expect" header set to "100-continue". Defaults to `nil` which
|
290
295
|
# disables this behaviour. This value can safely be set per
|
291
|
-
# request on the session
|
296
|
+
# request on the session.
|
292
297
|
#
|
293
298
|
# @option options [Boolean] :http_wire_trace (false) When `true`,
|
294
299
|
# HTTP debug output will be sent to the `:logger`.
|
@@ -325,7 +330,7 @@ module Aws::ServiceDiscovery
|
|
325
330
|
#
|
326
331
|
#
|
327
332
|
#
|
328
|
-
# [1]:
|
333
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
329
334
|
#
|
330
335
|
# @option params [required, String] :name
|
331
336
|
# The name that you want to assign to this namespace.
|
@@ -342,16 +347,44 @@ module Aws::ServiceDiscovery
|
|
342
347
|
# @option params [String] :description
|
343
348
|
# A description for the namespace.
|
344
349
|
#
|
350
|
+
# @option params [Array<Types::Tag>] :tags
|
351
|
+
# The tags to add to the namespace. Each tag consists of a key and an
|
352
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
353
|
+
# character length of 128 characters, and tag values can have a maximum
|
354
|
+
# length of 256 characters.
|
355
|
+
#
|
345
356
|
# @return [Types::CreateHttpNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
346
357
|
#
|
347
358
|
# * {Types::CreateHttpNamespaceResponse#operation_id #operation_id} => String
|
348
359
|
#
|
360
|
+
#
|
361
|
+
# @example Example: CreateHttpNamespace example
|
362
|
+
#
|
363
|
+
# # This example creates an HTTP namespace.
|
364
|
+
#
|
365
|
+
# resp = client.create_http_namespace({
|
366
|
+
# creator_request_id: "example-creator-request-id-0001",
|
367
|
+
# description: "Example.com AWS Cloud Map HTTP Namespace",
|
368
|
+
# name: "example-http.com",
|
369
|
+
# })
|
370
|
+
#
|
371
|
+
# resp.to_h outputs the following:
|
372
|
+
# {
|
373
|
+
# operation_id: "httpvoqozuhfet5kzxoxg-a-response-example",
|
374
|
+
# }
|
375
|
+
#
|
349
376
|
# @example Request syntax with placeholder values
|
350
377
|
#
|
351
378
|
# resp = client.create_http_namespace({
|
352
379
|
# name: "NamespaceName", # required
|
353
380
|
# creator_request_id: "ResourceId",
|
354
381
|
# description: "ResourceDescription",
|
382
|
+
# tags: [
|
383
|
+
# {
|
384
|
+
# key: "TagKey", # required
|
385
|
+
# value: "TagValue", # required
|
386
|
+
# },
|
387
|
+
# ],
|
355
388
|
# })
|
356
389
|
#
|
357
390
|
# @example Response structure
|
@@ -377,7 +410,7 @@ module Aws::ServiceDiscovery
|
|
377
410
|
#
|
378
411
|
#
|
379
412
|
#
|
380
|
-
# [1]:
|
413
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
381
414
|
#
|
382
415
|
# @option params [required, String] :name
|
383
416
|
# The name that you want to assign to this namespace. When you create a
|
@@ -400,10 +433,32 @@ module Aws::ServiceDiscovery
|
|
400
433
|
# The ID of the Amazon VPC that you want to associate the namespace
|
401
434
|
# with.
|
402
435
|
#
|
436
|
+
# @option params [Array<Types::Tag>] :tags
|
437
|
+
# The tags to add to the namespace. Each tag consists of a key and an
|
438
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
439
|
+
# character length of 128 characters, and tag values can have a maximum
|
440
|
+
# length of 256 characters.
|
441
|
+
#
|
403
442
|
# @return [Types::CreatePrivateDnsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
404
443
|
#
|
405
444
|
# * {Types::CreatePrivateDnsNamespaceResponse#operation_id #operation_id} => String
|
406
445
|
#
|
446
|
+
#
|
447
|
+
# @example Example: Example: Create private DNS namespace
|
448
|
+
#
|
449
|
+
# # Example: Create private DNS namespace
|
450
|
+
#
|
451
|
+
# resp = client.create_private_dns_namespace({
|
452
|
+
# creator_request_id: "eedd6892-50f3-41b2-8af9-611d6e1d1a8c",
|
453
|
+
# name: "example.com",
|
454
|
+
# vpc: "vpc-1c56417b",
|
455
|
+
# })
|
456
|
+
#
|
457
|
+
# resp.to_h outputs the following:
|
458
|
+
# {
|
459
|
+
# operation_id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
|
460
|
+
# }
|
461
|
+
#
|
407
462
|
# @example Request syntax with placeholder values
|
408
463
|
#
|
409
464
|
# resp = client.create_private_dns_namespace({
|
@@ -411,6 +466,12 @@ module Aws::ServiceDiscovery
|
|
411
466
|
# creator_request_id: "ResourceId",
|
412
467
|
# description: "ResourceDescription",
|
413
468
|
# vpc: "ResourceId", # required
|
469
|
+
# tags: [
|
470
|
+
# {
|
471
|
+
# key: "TagKey", # required
|
472
|
+
# value: "TagValue", # required
|
473
|
+
# },
|
474
|
+
# ],
|
414
475
|
# })
|
415
476
|
#
|
416
477
|
# @example Response structure
|
@@ -436,7 +497,7 @@ module Aws::ServiceDiscovery
|
|
436
497
|
#
|
437
498
|
#
|
438
499
|
#
|
439
|
-
# [1]:
|
500
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
440
501
|
#
|
441
502
|
# @option params [required, String] :name
|
442
503
|
# The name that you want to assign to this namespace.
|
@@ -453,16 +514,44 @@ module Aws::ServiceDiscovery
|
|
453
514
|
# @option params [String] :description
|
454
515
|
# A description for the namespace.
|
455
516
|
#
|
517
|
+
# @option params [Array<Types::Tag>] :tags
|
518
|
+
# The tags to add to the namespace. Each tag consists of a key and an
|
519
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
520
|
+
# character length of 128 characters, and tag values can have a maximum
|
521
|
+
# length of 256 characters.
|
522
|
+
#
|
456
523
|
# @return [Types::CreatePublicDnsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
457
524
|
#
|
458
525
|
# * {Types::CreatePublicDnsNamespaceResponse#operation_id #operation_id} => String
|
459
526
|
#
|
527
|
+
#
|
528
|
+
# @example Example: CreatePublicDnsNamespace example
|
529
|
+
#
|
530
|
+
# # This example creates a public namespace based on DNS.
|
531
|
+
#
|
532
|
+
# resp = client.create_public_dns_namespace({
|
533
|
+
# creator_request_id: "example-creator-request-id-0003",
|
534
|
+
# description: "Example.com AWS Cloud Map Public DNS Namespace",
|
535
|
+
# name: "example-public-dns.com",
|
536
|
+
# })
|
537
|
+
#
|
538
|
+
# resp.to_h outputs the following:
|
539
|
+
# {
|
540
|
+
# operation_id: "dns2voqozuhfet5kzxoxg-a-response-example",
|
541
|
+
# }
|
542
|
+
#
|
460
543
|
# @example Request syntax with placeholder values
|
461
544
|
#
|
462
545
|
# resp = client.create_public_dns_namespace({
|
463
546
|
# name: "NamespaceName", # required
|
464
547
|
# creator_request_id: "ResourceId",
|
465
548
|
# description: "ResourceDescription",
|
549
|
+
# tags: [
|
550
|
+
# {
|
551
|
+
# key: "TagKey", # required
|
552
|
+
# value: "TagValue", # required
|
553
|
+
# },
|
554
|
+
# ],
|
466
555
|
# })
|
467
556
|
#
|
468
557
|
# @example Response structure
|
@@ -496,21 +585,40 @@ module Aws::ServiceDiscovery
|
|
496
585
|
#
|
497
586
|
# * Optionally, a health check
|
498
587
|
#
|
499
|
-
# After you create the service, you can submit a RegisterInstance
|
588
|
+
# After you create the service, you can submit a [RegisterInstance][1]
|
500
589
|
# request, and AWS Cloud Map uses the values in the configuration to
|
501
590
|
# create the specified entities.
|
502
591
|
#
|
503
592
|
# For the current limit on the number of instances that you can register
|
504
593
|
# using the same namespace and using the same service, see [AWS Cloud
|
505
|
-
# Map Limits][
|
594
|
+
# Map Limits][2] in the *AWS Cloud Map Developer Guide*.
|
506
595
|
#
|
507
596
|
#
|
508
597
|
#
|
509
|
-
# [1]:
|
598
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html
|
599
|
+
# [2]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
510
600
|
#
|
511
601
|
# @option params [required, String] :name
|
512
602
|
# The name that you want to assign to the service.
|
513
603
|
#
|
604
|
+
# If you want AWS Cloud Map to create an SRV record when you register an
|
605
|
+
# instance, and if you're using a system that requires a specific SRV
|
606
|
+
# format, such as [HAProxy][1], specify the following for `Name`\:
|
607
|
+
#
|
608
|
+
# * Start the name with an underscore (\_), such as `_exampleservice`
|
609
|
+
#
|
610
|
+
# * End the name with *.\_protocol*, such as `._tcp`
|
611
|
+
#
|
612
|
+
# When you register an instance, AWS Cloud Map creates an SRV record and
|
613
|
+
# assigns a name to the record by concatenating the service name and the
|
614
|
+
# namespace name, for example:
|
615
|
+
#
|
616
|
+
# `_exampleservice._tcp.example.com`
|
617
|
+
#
|
618
|
+
#
|
619
|
+
#
|
620
|
+
# [1]: http://www.haproxy.org/
|
621
|
+
#
|
514
622
|
# @option params [String] :namespace_id
|
515
623
|
# The ID of the namespace that you want to use to create the service.
|
516
624
|
#
|
@@ -532,10 +640,10 @@ module Aws::ServiceDiscovery
|
|
532
640
|
# instance.
|
533
641
|
#
|
534
642
|
# @option params [Types::HealthCheckConfig] :health_check_config
|
535
|
-
# *Public DNS namespaces only.* A complex type that contains
|
536
|
-
# for an optional Route 53 health check. If you specify
|
537
|
-
# health check, AWS Cloud Map associates the health check
|
538
|
-
# Route 53 DNS records that you specify in `DnsConfig`.
|
643
|
+
# *Public DNS and HTTP namespaces only.* A complex type that contains
|
644
|
+
# settings for an optional Route 53 health check. If you specify
|
645
|
+
# settings for a health check, AWS Cloud Map associates the health check
|
646
|
+
# with all the Route 53 DNS records that you specify in `DnsConfig`.
|
539
647
|
#
|
540
648
|
# If you specify a health check configuration, you can specify either
|
541
649
|
# `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
|
@@ -554,10 +662,62 @@ module Aws::ServiceDiscovery
|
|
554
662
|
# If you specify a health check configuration, you can specify either
|
555
663
|
# `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
|
556
664
|
#
|
665
|
+
# You can't add, update, or delete a `HealthCheckCustomConfig`
|
666
|
+
# configuration from an existing service.
|
667
|
+
#
|
668
|
+
# @option params [Array<Types::Tag>] :tags
|
669
|
+
# The tags to add to the service. Each tag consists of a key and an
|
670
|
+
# optional value, both of which you define. Tag keys can have a maximum
|
671
|
+
# character length of 128 characters, and tag values can have a maximum
|
672
|
+
# length of 256 characters.
|
673
|
+
#
|
557
674
|
# @return [Types::CreateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
558
675
|
#
|
559
676
|
# * {Types::CreateServiceResponse#service #service} => Types::Service
|
560
677
|
#
|
678
|
+
#
|
679
|
+
# @example Example: Example: Create service
|
680
|
+
#
|
681
|
+
# # Example: Create service
|
682
|
+
#
|
683
|
+
# resp = client.create_service({
|
684
|
+
# creator_request_id: "567c1193-6b00-4308-bd57-ad38a8822d25",
|
685
|
+
# dns_config: {
|
686
|
+
# dns_records: [
|
687
|
+
# {
|
688
|
+
# ttl: 60,
|
689
|
+
# type: "A",
|
690
|
+
# },
|
691
|
+
# ],
|
692
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
693
|
+
# routing_policy: "MULTIVALUE",
|
694
|
+
# },
|
695
|
+
# name: "myservice",
|
696
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
697
|
+
# })
|
698
|
+
#
|
699
|
+
# resp.to_h outputs the following:
|
700
|
+
# {
|
701
|
+
# service: {
|
702
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
|
703
|
+
# create_date: Time.parse(1587081768.334),
|
704
|
+
# creator_request_id: "567c1193-6b00-4308-bd57-ad38a8822d25",
|
705
|
+
# dns_config: {
|
706
|
+
# dns_records: [
|
707
|
+
# {
|
708
|
+
# ttl: 60,
|
709
|
+
# type: "A",
|
710
|
+
# },
|
711
|
+
# ],
|
712
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
713
|
+
# routing_policy: "MULTIVALUE",
|
714
|
+
# },
|
715
|
+
# id: "srv-p5zdwlg5uvvzjita",
|
716
|
+
# name: "myservice",
|
717
|
+
# namespace_id: "ns-ylexjili4cdxy3xm",
|
718
|
+
# },
|
719
|
+
# }
|
720
|
+
#
|
561
721
|
# @example Request syntax with placeholder values
|
562
722
|
#
|
563
723
|
# resp = client.create_service({
|
@@ -583,6 +743,12 @@ module Aws::ServiceDiscovery
|
|
583
743
|
# health_check_custom_config: {
|
584
744
|
# failure_threshold: 1,
|
585
745
|
# },
|
746
|
+
# tags: [
|
747
|
+
# {
|
748
|
+
# key: "TagKey", # required
|
749
|
+
# value: "TagValue", # required
|
750
|
+
# },
|
751
|
+
# ],
|
586
752
|
# })
|
587
753
|
#
|
588
754
|
# @example Response structure
|
@@ -624,6 +790,20 @@ module Aws::ServiceDiscovery
|
|
624
790
|
#
|
625
791
|
# * {Types::DeleteNamespaceResponse#operation_id #operation_id} => String
|
626
792
|
#
|
793
|
+
#
|
794
|
+
# @example Example: Example: Delete namespace
|
795
|
+
#
|
796
|
+
# # Example: Delete namespace
|
797
|
+
#
|
798
|
+
# resp = client.delete_namespace({
|
799
|
+
# id: "ns-ylexjili4cdxy3xm",
|
800
|
+
# })
|
801
|
+
#
|
802
|
+
# resp.to_h outputs the following:
|
803
|
+
# {
|
804
|
+
# operation_id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k98y6drk",
|
805
|
+
# }
|
806
|
+
#
|
627
807
|
# @example Request syntax with placeholder values
|
628
808
|
#
|
629
809
|
# resp = client.delete_namespace({
|
@@ -651,6 +831,19 @@ module Aws::ServiceDiscovery
|
|
651
831
|
#
|
652
832
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
653
833
|
#
|
834
|
+
#
|
835
|
+
# @example Example: Example: Delete service
|
836
|
+
#
|
837
|
+
# # Example: Delete service
|
838
|
+
#
|
839
|
+
# resp = client.delete_service({
|
840
|
+
# id: "srv-p5zdwlg5uvvzjita",
|
841
|
+
# })
|
842
|
+
#
|
843
|
+
# resp.to_h outputs the following:
|
844
|
+
# {
|
845
|
+
# }
|
846
|
+
#
|
654
847
|
# @example Request syntax with placeholder values
|
655
848
|
#
|
656
849
|
# resp = client.delete_service({
|
@@ -673,12 +866,32 @@ module Aws::ServiceDiscovery
|
|
673
866
|
# The ID of the service that the instance is associated with.
|
674
867
|
#
|
675
868
|
# @option params [required, String] :instance_id
|
676
|
-
# The value that you specified for `Id` in the RegisterInstance
|
869
|
+
# The value that you specified for `Id` in the [RegisterInstance][1]
|
870
|
+
# request.
|
871
|
+
#
|
872
|
+
#
|
873
|
+
#
|
874
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html
|
677
875
|
#
|
678
876
|
# @return [Types::DeregisterInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
679
877
|
#
|
680
878
|
# * {Types::DeregisterInstanceResponse#operation_id #operation_id} => String
|
681
879
|
#
|
880
|
+
#
|
881
|
+
# @example Example: Example: Deregister a service instance
|
882
|
+
#
|
883
|
+
# # Example: Deregister a service instance
|
884
|
+
#
|
885
|
+
# resp = client.deregister_instance({
|
886
|
+
# instance_id: "myservice-53",
|
887
|
+
# service_id: "srv-p5zdwlg5uvvzjita",
|
888
|
+
# })
|
889
|
+
#
|
890
|
+
# resp.to_h outputs the following:
|
891
|
+
# {
|
892
|
+
# operation_id: "4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq",
|
893
|
+
# }
|
894
|
+
#
|
682
895
|
# @example Request syntax with placeholder values
|
683
896
|
#
|
684
897
|
# resp = client.deregister_instance({
|
@@ -700,6 +913,9 @@ module Aws::ServiceDiscovery
|
|
700
913
|
end
|
701
914
|
|
702
915
|
# Discovers registered instances for a specified namespace and service.
|
916
|
+
# You can use `DiscoverInstances` to discover instances for any type of
|
917
|
+
# namespace. For public and private DNS namespaces, you can also use DNS
|
918
|
+
# queries to discover instances.
|
703
919
|
#
|
704
920
|
# @option params [required, String] :namespace_name
|
705
921
|
# The name of the namespace that you specified when you registered the
|
@@ -710,9 +926,10 @@ module Aws::ServiceDiscovery
|
|
710
926
|
# instance.
|
711
927
|
#
|
712
928
|
# @option params [Integer] :max_results
|
713
|
-
# The maximum number of instances that you want Cloud Map to return
|
714
|
-
# the response to a `DiscoverInstances` request. If you don't
|
715
|
-
# value for `MaxResults`, Cloud Map returns up to 100
|
929
|
+
# The maximum number of instances that you want AWS Cloud Map to return
|
930
|
+
# in the response to a `DiscoverInstances` request. If you don't
|
931
|
+
# specify a value for `MaxResults`, AWS Cloud Map returns up to 100
|
932
|
+
# instances.
|
716
933
|
#
|
717
934
|
# @option params [Hash<String,String>] :query_parameters
|
718
935
|
# A string map that contains attributes with values that you can use to
|
@@ -727,6 +944,34 @@ module Aws::ServiceDiscovery
|
|
727
944
|
#
|
728
945
|
# * {Types::DiscoverInstancesResponse#instances #instances} => Array<Types::HttpInstanceSummary>
|
729
946
|
#
|
947
|
+
#
|
948
|
+
# @example Example: Example: Discover registered instances
|
949
|
+
#
|
950
|
+
# # Example: Discover registered instances
|
951
|
+
#
|
952
|
+
# resp = client.discover_instances({
|
953
|
+
# health_status: "ALL",
|
954
|
+
# max_results: 10,
|
955
|
+
# namespace_name: "example.com",
|
956
|
+
# service_name: "myservice",
|
957
|
+
# })
|
958
|
+
#
|
959
|
+
# resp.to_h outputs the following:
|
960
|
+
# {
|
961
|
+
# instances: [
|
962
|
+
# {
|
963
|
+
# attributes: {
|
964
|
+
# "AWS_INSTANCE_IPV4" => "172.2.1.3",
|
965
|
+
# "AWS_INSTANCE_PORT" => "808",
|
966
|
+
# },
|
967
|
+
# health_status: "UNKNOWN",
|
968
|
+
# instance_id: "myservice-53",
|
969
|
+
# namespace_name: "example.com",
|
970
|
+
# service_name: "myservice",
|
971
|
+
# },
|
972
|
+
# ],
|
973
|
+
# }
|
974
|
+
#
|
730
975
|
# @example Request syntax with placeholder values
|
731
976
|
#
|
732
977
|
# resp = client.discover_instances({
|
@@ -770,6 +1015,30 @@ module Aws::ServiceDiscovery
|
|
770
1015
|
#
|
771
1016
|
# * {Types::GetInstanceResponse#instance #instance} => Types::Instance
|
772
1017
|
#
|
1018
|
+
#
|
1019
|
+
# @example Example: GetInstance example
|
1020
|
+
#
|
1021
|
+
# # This example gets information about a specified instance.
|
1022
|
+
#
|
1023
|
+
# resp = client.get_instance({
|
1024
|
+
# instance_id: "i-abcd1234",
|
1025
|
+
# service_id: "srv-e4anhexample0004",
|
1026
|
+
# })
|
1027
|
+
#
|
1028
|
+
# resp.to_h outputs the following:
|
1029
|
+
# {
|
1030
|
+
# instance: {
|
1031
|
+
# attributes: {
|
1032
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.44",
|
1033
|
+
# "AWS_INSTANCE_PORT" => "80",
|
1034
|
+
# "color" => "green",
|
1035
|
+
# "region" => "us-west-2",
|
1036
|
+
# "stage" => "beta",
|
1037
|
+
# },
|
1038
|
+
# id: "i-abcd1234",
|
1039
|
+
# },
|
1040
|
+
# }
|
1041
|
+
#
|
773
1042
|
# @example Request syntax with placeholder values
|
774
1043
|
#
|
775
1044
|
# resp = client.get_instance({
|
@@ -812,10 +1081,14 @@ module Aws::ServiceDiscovery
|
|
812
1081
|
# all the instances that are associated with the specified service.
|
813
1082
|
#
|
814
1083
|
# <note markdown="1"> To get the IDs for the instances that you've registered by using a
|
815
|
-
# specified service, submit a ListInstances request.
|
1084
|
+
# specified service, submit a [ListInstances][1] request.
|
816
1085
|
#
|
817
1086
|
# </note>
|
818
1087
|
#
|
1088
|
+
#
|
1089
|
+
#
|
1090
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html
|
1091
|
+
#
|
819
1092
|
# @option params [Integer] :max_results
|
820
1093
|
# The maximum number of instances that you want AWS Cloud Map to return
|
821
1094
|
# in the response to a `GetInstancesHealthStatus` request. If you don't
|
@@ -835,6 +1108,25 @@ module Aws::ServiceDiscovery
|
|
835
1108
|
# * {Types::GetInstancesHealthStatusResponse#status #status} => Hash<String,String>
|
836
1109
|
# * {Types::GetInstancesHealthStatusResponse#next_token #next_token} => String
|
837
1110
|
#
|
1111
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1112
|
+
#
|
1113
|
+
#
|
1114
|
+
# @example Example: GetInstancesHealthStatus example
|
1115
|
+
#
|
1116
|
+
# # This example gets the current health status of one or more instances that are associate with a specified service.
|
1117
|
+
#
|
1118
|
+
# resp = client.get_instances_health_status({
|
1119
|
+
# service_id: "srv-e4anhexample0004",
|
1120
|
+
# })
|
1121
|
+
#
|
1122
|
+
# resp.to_h outputs the following:
|
1123
|
+
# {
|
1124
|
+
# status: {
|
1125
|
+
# "i-abcd1234" => "HEALTHY",
|
1126
|
+
# "i-abcd1235" => "UNHEALTHY",
|
1127
|
+
# },
|
1128
|
+
# }
|
1129
|
+
#
|
838
1130
|
# @example Request syntax with placeholder values
|
839
1131
|
#
|
840
1132
|
# resp = client.get_instances_health_status({
|
@@ -868,6 +1160,35 @@ module Aws::ServiceDiscovery
|
|
868
1160
|
#
|
869
1161
|
# * {Types::GetNamespaceResponse#namespace #namespace} => Types::Namespace
|
870
1162
|
#
|
1163
|
+
#
|
1164
|
+
# @example Example: GetNamespace example
|
1165
|
+
#
|
1166
|
+
# # This example gets information about a specified namespace.
|
1167
|
+
#
|
1168
|
+
# resp = client.get_namespace({
|
1169
|
+
# id: "ns-e4anhexample0004",
|
1170
|
+
# })
|
1171
|
+
#
|
1172
|
+
# resp.to_h outputs the following:
|
1173
|
+
# {
|
1174
|
+
# namespace: {
|
1175
|
+
# arn: "arn:aws:servicediscovery:us-west-2: 123456789120:namespace/ns-e1tpmexample0001",
|
1176
|
+
# create_date: Time.parse("20181118T211712Z"),
|
1177
|
+
# creator_request_id: "example-creator-request-id-0001",
|
1178
|
+
# description: "Example.com AWS Cloud Map HTTP Namespace",
|
1179
|
+
# id: "ns-e1tpmexample0001",
|
1180
|
+
# name: "example-http.com",
|
1181
|
+
# properties: {
|
1182
|
+
# dns_properties: {
|
1183
|
+
# },
|
1184
|
+
# http_properties: {
|
1185
|
+
# http_name: "example-http.com",
|
1186
|
+
# },
|
1187
|
+
# },
|
1188
|
+
# type: "HTTP",
|
1189
|
+
# },
|
1190
|
+
# }
|
1191
|
+
#
|
871
1192
|
# @example Request syntax with placeholder values
|
872
1193
|
#
|
873
1194
|
# resp = client.get_namespace({
|
@@ -900,10 +1221,14 @@ module Aws::ServiceDiscovery
|
|
900
1221
|
# the response, such as a `CreateService` request.
|
901
1222
|
#
|
902
1223
|
# <note markdown="1"> To get a list of operations that match specified criteria, see
|
903
|
-
# ListOperations.
|
1224
|
+
# [ListOperations][1].
|
904
1225
|
#
|
905
1226
|
# </note>
|
906
1227
|
#
|
1228
|
+
#
|
1229
|
+
#
|
1230
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html
|
1231
|
+
#
|
907
1232
|
# @option params [required, String] :operation_id
|
908
1233
|
# The ID of the operation that you want to get more information about.
|
909
1234
|
#
|
@@ -911,6 +1236,29 @@ module Aws::ServiceDiscovery
|
|
911
1236
|
#
|
912
1237
|
# * {Types::GetOperationResponse#operation #operation} => Types::Operation
|
913
1238
|
#
|
1239
|
+
#
|
1240
|
+
# @example Example: Example: Get operation result
|
1241
|
+
#
|
1242
|
+
# # Example: Get operation result
|
1243
|
+
#
|
1244
|
+
# resp = client.get_operation({
|
1245
|
+
# operation_id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
|
1246
|
+
# })
|
1247
|
+
#
|
1248
|
+
# resp.to_h outputs the following:
|
1249
|
+
# {
|
1250
|
+
# operation: {
|
1251
|
+
# create_date: Time.parse(1587055860.121),
|
1252
|
+
# id: "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd",
|
1253
|
+
# status: "SUCCESS",
|
1254
|
+
# targets: {
|
1255
|
+
# "NAMESPACE" => "ns-ylexjili4cdxy3xm",
|
1256
|
+
# },
|
1257
|
+
# type: "CREATE_NAMESPACE",
|
1258
|
+
# update_date: Time.parse(1587055900.469),
|
1259
|
+
# },
|
1260
|
+
# }
|
1261
|
+
#
|
914
1262
|
# @example Request syntax with placeholder values
|
915
1263
|
#
|
916
1264
|
# resp = client.get_operation({
|
@@ -947,6 +1295,33 @@ module Aws::ServiceDiscovery
|
|
947
1295
|
#
|
948
1296
|
# * {Types::GetServiceResponse#service #service} => Types::Service
|
949
1297
|
#
|
1298
|
+
#
|
1299
|
+
# @example Example: GetService Example
|
1300
|
+
#
|
1301
|
+
# # This example gets the settings for a specified service.
|
1302
|
+
#
|
1303
|
+
# resp = client.get_service({
|
1304
|
+
# id: "srv-e4anhexample0004",
|
1305
|
+
# })
|
1306
|
+
#
|
1307
|
+
# resp.to_h outputs the following:
|
1308
|
+
# {
|
1309
|
+
# service: {
|
1310
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789120:service/srv-e4anhexample0004",
|
1311
|
+
# create_date: Time.parse("20181118T211707Z"),
|
1312
|
+
# creator_request_id: "example-creator-request-id-0004",
|
1313
|
+
# description: "Example.com AWS Cloud Map HTTP Service",
|
1314
|
+
# health_check_config: {
|
1315
|
+
# failure_threshold: 3,
|
1316
|
+
# resource_path: "/",
|
1317
|
+
# type: "HTTPS",
|
1318
|
+
# },
|
1319
|
+
# id: "srv-e4anhexample0004",
|
1320
|
+
# name: "example-http-service",
|
1321
|
+
# namespace_id: "ns-e4anhexample0004",
|
1322
|
+
# },
|
1323
|
+
# }
|
1324
|
+
#
|
950
1325
|
# @example Request syntax with placeholder values
|
951
1326
|
#
|
952
1327
|
# resp = client.get_service({
|
@@ -1006,6 +1381,30 @@ module Aws::ServiceDiscovery
|
|
1006
1381
|
# * {Types::ListInstancesResponse#instances #instances} => Array<Types::InstanceSummary>
|
1007
1382
|
# * {Types::ListInstancesResponse#next_token #next_token} => String
|
1008
1383
|
#
|
1384
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1385
|
+
#
|
1386
|
+
#
|
1387
|
+
# @example Example: Example: List service instances
|
1388
|
+
#
|
1389
|
+
# # Example: List service instances
|
1390
|
+
#
|
1391
|
+
# resp = client.list_instances({
|
1392
|
+
# service_id: "srv-qzpwvt2tfqcegapy",
|
1393
|
+
# })
|
1394
|
+
#
|
1395
|
+
# resp.to_h outputs the following:
|
1396
|
+
# {
|
1397
|
+
# instances: [
|
1398
|
+
# {
|
1399
|
+
# attributes: {
|
1400
|
+
# "AWS_INSTANCE_IPV4" => "172.2.1.3",
|
1401
|
+
# "AWS_INSTANCE_PORT" => "808",
|
1402
|
+
# },
|
1403
|
+
# id: "i-06bdabbae60f65a4e",
|
1404
|
+
# },
|
1405
|
+
# ],
|
1406
|
+
# }
|
1407
|
+
#
|
1009
1408
|
# @example Request syntax with placeholder values
|
1010
1409
|
#
|
1011
1410
|
# resp = client.list_instances({
|
@@ -1066,6 +1465,67 @@ module Aws::ServiceDiscovery
|
|
1066
1465
|
# * {Types::ListNamespacesResponse#namespaces #namespaces} => Array<Types::NamespaceSummary>
|
1067
1466
|
# * {Types::ListNamespacesResponse#next_token #next_token} => String
|
1068
1467
|
#
|
1468
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1469
|
+
#
|
1470
|
+
#
|
1471
|
+
# @example Example: Example: List namespaces
|
1472
|
+
#
|
1473
|
+
# # Example: List namespaces
|
1474
|
+
#
|
1475
|
+
# resp = client.list_namespaces({
|
1476
|
+
# })
|
1477
|
+
#
|
1478
|
+
# resp.to_h outputs the following:
|
1479
|
+
# {
|
1480
|
+
# namespaces: [
|
1481
|
+
# {
|
1482
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-a3ccy2e7e3a7rile",
|
1483
|
+
# create_date: Time.parse(1585354387.357),
|
1484
|
+
# id: "ns-a3ccy2e7e3a7rile",
|
1485
|
+
# name: "local",
|
1486
|
+
# properties: {
|
1487
|
+
# dns_properties: {
|
1488
|
+
# hosted_zone_id: "Z06752353VBUDTC32S84S",
|
1489
|
+
# },
|
1490
|
+
# http_properties: {
|
1491
|
+
# http_name: "local",
|
1492
|
+
# },
|
1493
|
+
# },
|
1494
|
+
# type: "DNS_PRIVATE",
|
1495
|
+
# },
|
1496
|
+
# {
|
1497
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-pocfyjtrsmwtvcxx",
|
1498
|
+
# create_date: Time.parse(1586468974.698),
|
1499
|
+
# description: "My second namespace",
|
1500
|
+
# id: "ns-pocfyjtrsmwtvcxx",
|
1501
|
+
# name: "My-second-namespace",
|
1502
|
+
# properties: {
|
1503
|
+
# dns_properties: {
|
1504
|
+
# },
|
1505
|
+
# http_properties: {
|
1506
|
+
# http_name: "My-second-namespace",
|
1507
|
+
# },
|
1508
|
+
# },
|
1509
|
+
# type: "HTTP",
|
1510
|
+
# },
|
1511
|
+
# {
|
1512
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
1513
|
+
# create_date: Time.parse(1587055896.798),
|
1514
|
+
# id: "ns-ylexjili4cdxy3xm",
|
1515
|
+
# name: "example.com",
|
1516
|
+
# properties: {
|
1517
|
+
# dns_properties: {
|
1518
|
+
# hosted_zone_id: "Z09983722P0QME1B3KC8I",
|
1519
|
+
# },
|
1520
|
+
# http_properties: {
|
1521
|
+
# http_name: "example.com",
|
1522
|
+
# },
|
1523
|
+
# },
|
1524
|
+
# type: "DNS_PRIVATE",
|
1525
|
+
# },
|
1526
|
+
# ],
|
1527
|
+
# }
|
1528
|
+
#
|
1069
1529
|
# @example Request syntax with placeholder values
|
1070
1530
|
#
|
1071
1531
|
# resp = client.list_namespaces({
|
@@ -1138,6 +1598,44 @@ module Aws::ServiceDiscovery
|
|
1138
1598
|
# * {Types::ListOperationsResponse#operations #operations} => Array<Types::OperationSummary>
|
1139
1599
|
# * {Types::ListOperationsResponse#next_token #next_token} => String
|
1140
1600
|
#
|
1601
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1602
|
+
#
|
1603
|
+
#
|
1604
|
+
# @example Example: ListOperations Example
|
1605
|
+
#
|
1606
|
+
# # This example gets the operations that have a STATUS of either PENDING or SUCCESS.
|
1607
|
+
#
|
1608
|
+
# resp = client.list_operations({
|
1609
|
+
# filters: [
|
1610
|
+
# {
|
1611
|
+
# condition: "IN",
|
1612
|
+
# name: "STATUS",
|
1613
|
+
# values: [
|
1614
|
+
# "PENDING",
|
1615
|
+
# "SUCCESS",
|
1616
|
+
# ],
|
1617
|
+
# },
|
1618
|
+
# ],
|
1619
|
+
# })
|
1620
|
+
#
|
1621
|
+
# resp.to_h outputs the following:
|
1622
|
+
# {
|
1623
|
+
# operations: [
|
1624
|
+
# {
|
1625
|
+
# id: "76yy8ovhpdz0plmjzbsnqgnrqvpv2qdt-kexample",
|
1626
|
+
# status: "SUCCESS",
|
1627
|
+
# },
|
1628
|
+
# {
|
1629
|
+
# id: "prysnyzpji3u2ciy45nke83x2zanl7yk-dexample",
|
1630
|
+
# status: "SUCCESS",
|
1631
|
+
# },
|
1632
|
+
# {
|
1633
|
+
# id: "ko4ekftir7kzlbechsh7xvcdgcpk66gh-7example",
|
1634
|
+
# status: "PENDING",
|
1635
|
+
# },
|
1636
|
+
# ],
|
1637
|
+
# }
|
1638
|
+
#
|
1141
1639
|
# @example Request syntax with placeholder values
|
1142
1640
|
#
|
1143
1641
|
# resp = client.list_operations({
|
@@ -1203,6 +1701,37 @@ module Aws::ServiceDiscovery
|
|
1203
1701
|
# * {Types::ListServicesResponse#services #services} => Array<Types::ServiceSummary>
|
1204
1702
|
# * {Types::ListServicesResponse#next_token #next_token} => String
|
1205
1703
|
#
|
1704
|
+
# The returned {Seahorse::Client::Response response} is a pageable response and is Enumerable. For details on usage see {Aws::PageableResponse PageableResponse}.
|
1705
|
+
#
|
1706
|
+
#
|
1707
|
+
# @example Example: Example: List services
|
1708
|
+
#
|
1709
|
+
# # Example: List services
|
1710
|
+
#
|
1711
|
+
# resp = client.list_services({
|
1712
|
+
# })
|
1713
|
+
#
|
1714
|
+
# resp.to_h outputs the following:
|
1715
|
+
# {
|
1716
|
+
# services: [
|
1717
|
+
# {
|
1718
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
|
1719
|
+
# create_date: Time.parse(1587081768.334),
|
1720
|
+
# dns_config: {
|
1721
|
+
# dns_records: [
|
1722
|
+
# {
|
1723
|
+
# ttl: 60,
|
1724
|
+
# type: "A",
|
1725
|
+
# },
|
1726
|
+
# ],
|
1727
|
+
# routing_policy: "MULTIVALUE",
|
1728
|
+
# },
|
1729
|
+
# id: "srv-p5zdwlg5uvvzjita",
|
1730
|
+
# name: "myservice",
|
1731
|
+
# },
|
1732
|
+
# ],
|
1733
|
+
# }
|
1734
|
+
#
|
1206
1735
|
# @example Request syntax with placeholder values
|
1207
1736
|
#
|
1208
1737
|
# resp = client.list_services({
|
@@ -1246,6 +1775,60 @@ module Aws::ServiceDiscovery
|
|
1246
1775
|
req.send_request(options)
|
1247
1776
|
end
|
1248
1777
|
|
1778
|
+
# Lists tags for the specified resource.
|
1779
|
+
#
|
1780
|
+
# @option params [required, String] :resource_arn
|
1781
|
+
# The Amazon Resource Name (ARN) of the resource that you want to
|
1782
|
+
# retrieve tags for.
|
1783
|
+
#
|
1784
|
+
# @return [Types::ListTagsForResourceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1785
|
+
#
|
1786
|
+
# * {Types::ListTagsForResourceResponse#tags #tags} => Array<Types::Tag>
|
1787
|
+
#
|
1788
|
+
#
|
1789
|
+
# @example Example: ListTagsForResource example
|
1790
|
+
#
|
1791
|
+
# # This example lists the tags of a resource.
|
1792
|
+
#
|
1793
|
+
# resp = client.list_tags_for_resource({
|
1794
|
+
# resource_arn: "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
1795
|
+
# })
|
1796
|
+
#
|
1797
|
+
# resp.to_h outputs the following:
|
1798
|
+
# {
|
1799
|
+
# tags: [
|
1800
|
+
# {
|
1801
|
+
# key: "Project",
|
1802
|
+
# value: "Zeta",
|
1803
|
+
# },
|
1804
|
+
# {
|
1805
|
+
# key: "Department",
|
1806
|
+
# value: "Engineering",
|
1807
|
+
# },
|
1808
|
+
# ],
|
1809
|
+
# }
|
1810
|
+
#
|
1811
|
+
# @example Request syntax with placeholder values
|
1812
|
+
#
|
1813
|
+
# resp = client.list_tags_for_resource({
|
1814
|
+
# resource_arn: "AmazonResourceName", # required
|
1815
|
+
# })
|
1816
|
+
#
|
1817
|
+
# @example Response structure
|
1818
|
+
#
|
1819
|
+
# resp.tags #=> Array
|
1820
|
+
# resp.tags[0].key #=> String
|
1821
|
+
# resp.tags[0].value #=> String
|
1822
|
+
#
|
1823
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListTagsForResource AWS API Documentation
|
1824
|
+
#
|
1825
|
+
# @overload list_tags_for_resource(params = {})
|
1826
|
+
# @param [Hash] params ({})
|
1827
|
+
def list_tags_for_resource(params = {}, options = {})
|
1828
|
+
req = build_request(:list_tags_for_resource, params)
|
1829
|
+
req.send_request(options)
|
1830
|
+
end
|
1831
|
+
|
1249
1832
|
# Creates or updates one or more records and, optionally, creates a
|
1250
1833
|
# health check based on the settings in a specified service. When you
|
1251
1834
|
# submit a `RegisterInstance` request, the following occurs:
|
@@ -1263,7 +1846,7 @@ module Aws::ServiceDiscovery
|
|
1263
1846
|
# One `RegisterInstance` request must complete before you can submit
|
1264
1847
|
# another request and specify the same service ID and instance ID.
|
1265
1848
|
#
|
1266
|
-
# For more information, see CreateService.
|
1849
|
+
# For more information, see [CreateService][1].
|
1267
1850
|
#
|
1268
1851
|
# When AWS Cloud Map receives a DNS query for the specified DNS name, it
|
1269
1852
|
# returns the applicable value:
|
@@ -1278,11 +1861,12 @@ module Aws::ServiceDiscovery
|
|
1278
1861
|
#
|
1279
1862
|
# For the current limit on the number of instances that you can register
|
1280
1863
|
# using the same namespace and using the same service, see [AWS Cloud
|
1281
|
-
# Map Limits][
|
1864
|
+
# Map Limits][2] in the *AWS Cloud Map Developer Guide*.
|
1282
1865
|
#
|
1283
1866
|
#
|
1284
1867
|
#
|
1285
|
-
# [1]:
|
1868
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html
|
1869
|
+
# [2]: https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html
|
1286
1870
|
#
|
1287
1871
|
# @option params [required, String] :service_id
|
1288
1872
|
# The ID of the service that you want to use for settings for the
|
@@ -1295,7 +1879,7 @@ module Aws::ServiceDiscovery
|
|
1295
1879
|
# * If the service that is specified by `ServiceId` includes settings
|
1296
1880
|
# for an SRV record, the value of `InstanceId` is automatically
|
1297
1881
|
# included as part of the value for the SRV record. For more
|
1298
|
-
# information, see DnsRecord
|
1882
|
+
# information, see [DnsRecord > Type][1].
|
1299
1883
|
#
|
1300
1884
|
# * You can use this value to update an existing instance.
|
1301
1885
|
#
|
@@ -1312,6 +1896,10 @@ module Aws::ServiceDiscovery
|
|
1312
1896
|
#
|
1313
1897
|
# </note>
|
1314
1898
|
#
|
1899
|
+
#
|
1900
|
+
#
|
1901
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type
|
1902
|
+
#
|
1315
1903
|
# @option params [String] :creator_request_id
|
1316
1904
|
# A unique string that identifies the request and that allows failed
|
1317
1905
|
# `RegisterInstance` requests to be retried without the risk of
|
@@ -1411,23 +1999,45 @@ module Aws::ServiceDiscovery
|
|
1411
1999
|
# If the service includes `HealthCheckConfig`, the port on the endpoint
|
1412
2000
|
# that you want Route 53 to send requests to.
|
1413
2001
|
#
|
1414
|
-
# This value is required if you specified settings for an SRV record
|
1415
|
-
# when you created the service.
|
2002
|
+
# This value is required if you specified settings for an SRV record or
|
2003
|
+
# a Route 53 health check when you created the service.
|
1416
2004
|
#
|
1417
2005
|
# **Custom attributes**
|
1418
2006
|
#
|
1419
2007
|
# You can add up to 30 custom attributes. For each key-value pair, the
|
1420
2008
|
# maximum length of the attribute name is 255 characters, and the
|
1421
|
-
# maximum length of the attribute value is 1,024 characters.
|
2009
|
+
# maximum length of the attribute value is 1,024 characters. Total size
|
2010
|
+
# of all provided attributes (sum of all keys and values) must not
|
2011
|
+
# exceed 5,000 characters.
|
1422
2012
|
#
|
1423
2013
|
#
|
1424
2014
|
#
|
1425
|
-
# [1]:
|
2015
|
+
# [1]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html
|
1426
2016
|
#
|
1427
2017
|
# @return [Types::RegisterInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1428
2018
|
#
|
1429
2019
|
# * {Types::RegisterInstanceResponse#operation_id #operation_id} => String
|
1430
2020
|
#
|
2021
|
+
#
|
2022
|
+
# @example Example: Example: Register Instance
|
2023
|
+
#
|
2024
|
+
# # Example: Register Instance
|
2025
|
+
#
|
2026
|
+
# resp = client.register_instance({
|
2027
|
+
# attributes: {
|
2028
|
+
# "AWS_INSTANCE_IPV4" => "172.2.1.3",
|
2029
|
+
# "AWS_INSTANCE_PORT" => "808",
|
2030
|
+
# },
|
2031
|
+
# creator_request_id: "7a48a98a-72e6-4849-bfa7-1a458e030d7b",
|
2032
|
+
# instance_id: "myservice-53",
|
2033
|
+
# service_id: "srv-p5zdwlg5uvvzjita",
|
2034
|
+
# })
|
2035
|
+
#
|
2036
|
+
# resp.to_h outputs the following:
|
2037
|
+
# {
|
2038
|
+
# operation_id: "4yejorelbukcjzpnr6tlmrghsjwpngf4-k95yg2u7",
|
2039
|
+
# }
|
2040
|
+
#
|
1431
2041
|
# @example Request syntax with placeholder values
|
1432
2042
|
#
|
1433
2043
|
# resp = client.register_instance({
|
@@ -1452,6 +2062,107 @@ module Aws::ServiceDiscovery
|
|
1452
2062
|
req.send_request(options)
|
1453
2063
|
end
|
1454
2064
|
|
2065
|
+
# Adds one or more tags to the specified resource.
|
2066
|
+
#
|
2067
|
+
# @option params [required, String] :resource_arn
|
2068
|
+
# The Amazon Resource Name (ARN) of the resource that you want to
|
2069
|
+
# retrieve tags for.
|
2070
|
+
#
|
2071
|
+
# @option params [required, Array<Types::Tag>] :tags
|
2072
|
+
# The tags to add to the specified resource. Specifying the tag key is
|
2073
|
+
# required. You can set the value of a tag to an empty string, but you
|
2074
|
+
# can't set the value of a tag to null.
|
2075
|
+
#
|
2076
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2077
|
+
#
|
2078
|
+
#
|
2079
|
+
# @example Example: TagResource example
|
2080
|
+
#
|
2081
|
+
# # This example adds "Department" and "Project" tags to a resource.
|
2082
|
+
#
|
2083
|
+
# resp = client.tag_resource({
|
2084
|
+
# resource_arn: "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
2085
|
+
# tags: [
|
2086
|
+
# {
|
2087
|
+
# key: "Department",
|
2088
|
+
# value: "Engineering",
|
2089
|
+
# },
|
2090
|
+
# {
|
2091
|
+
# key: "Project",
|
2092
|
+
# value: "Zeta",
|
2093
|
+
# },
|
2094
|
+
# ],
|
2095
|
+
# })
|
2096
|
+
#
|
2097
|
+
# resp.to_h outputs the following:
|
2098
|
+
# {
|
2099
|
+
# }
|
2100
|
+
#
|
2101
|
+
# @example Request syntax with placeholder values
|
2102
|
+
#
|
2103
|
+
# resp = client.tag_resource({
|
2104
|
+
# resource_arn: "AmazonResourceName", # required
|
2105
|
+
# tags: [ # required
|
2106
|
+
# {
|
2107
|
+
# key: "TagKey", # required
|
2108
|
+
# value: "TagValue", # required
|
2109
|
+
# },
|
2110
|
+
# ],
|
2111
|
+
# })
|
2112
|
+
#
|
2113
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/TagResource AWS API Documentation
|
2114
|
+
#
|
2115
|
+
# @overload tag_resource(params = {})
|
2116
|
+
# @param [Hash] params ({})
|
2117
|
+
def tag_resource(params = {}, options = {})
|
2118
|
+
req = build_request(:tag_resource, params)
|
2119
|
+
req.send_request(options)
|
2120
|
+
end
|
2121
|
+
|
2122
|
+
# Removes one or more tags from the specified resource.
|
2123
|
+
#
|
2124
|
+
# @option params [required, String] :resource_arn
|
2125
|
+
# The Amazon Resource Name (ARN) of the resource that you want to
|
2126
|
+
# retrieve tags for.
|
2127
|
+
#
|
2128
|
+
# @option params [required, Array<String>] :tag_keys
|
2129
|
+
# The tag keys to remove from the specified resource.
|
2130
|
+
#
|
2131
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2132
|
+
#
|
2133
|
+
#
|
2134
|
+
# @example Example: UntagResource example
|
2135
|
+
#
|
2136
|
+
# # This example removes the "Department" and "Project" tags from a resource.
|
2137
|
+
#
|
2138
|
+
# resp = client.untag_resource({
|
2139
|
+
# resource_arn: "arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
2140
|
+
# tag_keys: [
|
2141
|
+
# "Project",
|
2142
|
+
# "Department",
|
2143
|
+
# ],
|
2144
|
+
# })
|
2145
|
+
#
|
2146
|
+
# resp.to_h outputs the following:
|
2147
|
+
# {
|
2148
|
+
# }
|
2149
|
+
#
|
2150
|
+
# @example Request syntax with placeholder values
|
2151
|
+
#
|
2152
|
+
# resp = client.untag_resource({
|
2153
|
+
# resource_arn: "AmazonResourceName", # required
|
2154
|
+
# tag_keys: ["TagKey"], # required
|
2155
|
+
# })
|
2156
|
+
#
|
2157
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UntagResource AWS API Documentation
|
2158
|
+
#
|
2159
|
+
# @overload untag_resource(params = {})
|
2160
|
+
# @param [Hash] params ({})
|
2161
|
+
def untag_resource(params = {}, options = {})
|
2162
|
+
req = build_request(:untag_resource, params)
|
2163
|
+
req.send_request(options)
|
2164
|
+
end
|
2165
|
+
|
1455
2166
|
# Submits a request to change the health status of a custom health check
|
1456
2167
|
# to healthy or unhealthy.
|
1457
2168
|
#
|
@@ -1461,7 +2172,11 @@ module Aws::ServiceDiscovery
|
|
1461
2172
|
# to change the status for Route 53 health checks, which you define
|
1462
2173
|
# using `HealthCheckConfig`.
|
1463
2174
|
#
|
1464
|
-
# For more information, see HealthCheckCustomConfig.
|
2175
|
+
# For more information, see [HealthCheckCustomConfig][1].
|
2176
|
+
#
|
2177
|
+
#
|
2178
|
+
#
|
2179
|
+
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html
|
1465
2180
|
#
|
1466
2181
|
# @option params [required, String] :service_id
|
1467
2182
|
# The ID of the service that includes the configuration for the custom
|
@@ -1475,6 +2190,18 @@ module Aws::ServiceDiscovery
|
|
1475
2190
|
#
|
1476
2191
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1477
2192
|
#
|
2193
|
+
#
|
2194
|
+
# @example Example: UpdateInstanceCustomHealthStatus Example
|
2195
|
+
#
|
2196
|
+
# # This example submits a request to change the health status of an instance associated with a service with a custom health
|
2197
|
+
# # check to HEALTHY.
|
2198
|
+
#
|
2199
|
+
# resp = client.update_instance_custom_health_status({
|
2200
|
+
# instance_id: "i-abcd1234",
|
2201
|
+
# service_id: "srv-e4anhexample0004",
|
2202
|
+
# status: "HEALTHY",
|
2203
|
+
# })
|
2204
|
+
#
|
1478
2205
|
# @example Request syntax with placeholder values
|
1479
2206
|
#
|
1480
2207
|
# resp = client.update_instance_custom_health_status({
|
@@ -1494,21 +2221,28 @@ module Aws::ServiceDiscovery
|
|
1494
2221
|
|
1495
2222
|
# Submits a request to perform the following operations:
|
1496
2223
|
#
|
1497
|
-
# * Add or delete `DnsRecords` configurations
|
1498
|
-
#
|
1499
2224
|
# * Update the TTL setting for existing `DnsRecords` configurations
|
1500
2225
|
#
|
1501
2226
|
# * Add, update, or delete `HealthCheckConfig` for a specified service
|
1502
2227
|
#
|
1503
|
-
#
|
1504
|
-
#
|
1505
|
-
#
|
1506
|
-
#
|
1507
|
-
# deleted.
|
2228
|
+
# <note markdown="1"> You can't add, update, or delete a `HealthCheckCustomConfig`
|
2229
|
+
# configuration.
|
2230
|
+
#
|
2231
|
+
# </note>
|
1508
2232
|
#
|
1509
|
-
#
|
1510
|
-
#
|
1511
|
-
#
|
2233
|
+
# For public and private DNS namespaces, note the following:
|
2234
|
+
#
|
2235
|
+
# * If you omit any existing `DnsRecords` or `HealthCheckConfig`
|
2236
|
+
# configurations from an `UpdateService` request, the configurations
|
2237
|
+
# are deleted from the service.
|
2238
|
+
#
|
2239
|
+
# * If you omit an existing `HealthCheckCustomConfig` configuration from
|
2240
|
+
# an `UpdateService` request, the configuration is not deleted from
|
2241
|
+
# the service.
|
2242
|
+
#
|
2243
|
+
# When you update settings for a service, AWS Cloud Map also updates the
|
2244
|
+
# corresponding settings in all the records and health checks that were
|
2245
|
+
# created by using the specified service.
|
1512
2246
|
#
|
1513
2247
|
# @option params [required, String] :id
|
1514
2248
|
# The ID of the service that you want to update.
|
@@ -1520,13 +2254,42 @@ module Aws::ServiceDiscovery
|
|
1520
2254
|
#
|
1521
2255
|
# * {Types::UpdateServiceResponse#operation_id #operation_id} => String
|
1522
2256
|
#
|
2257
|
+
#
|
2258
|
+
# @example Example: UpdateService Example
|
2259
|
+
#
|
2260
|
+
# # This example submits a request to replace the DnsConfig and HealthCheckConfig settings of a specified service.
|
2261
|
+
#
|
2262
|
+
# resp = client.update_service({
|
2263
|
+
# id: "srv-e4anhexample0004",
|
2264
|
+
# service: {
|
2265
|
+
# dns_config: {
|
2266
|
+
# dns_records: [
|
2267
|
+
# {
|
2268
|
+
# ttl: 60,
|
2269
|
+
# type: "A",
|
2270
|
+
# },
|
2271
|
+
# ],
|
2272
|
+
# },
|
2273
|
+
# health_check_config: {
|
2274
|
+
# failure_threshold: 2,
|
2275
|
+
# resource_path: "/",
|
2276
|
+
# type: "HTTP",
|
2277
|
+
# },
|
2278
|
+
# },
|
2279
|
+
# })
|
2280
|
+
#
|
2281
|
+
# resp.to_h outputs the following:
|
2282
|
+
# {
|
2283
|
+
# operation_id: "m35hsdrkxwjffm3xef4bxyy6vc3ewakx-jdn3y5g5",
|
2284
|
+
# }
|
2285
|
+
#
|
1523
2286
|
# @example Request syntax with placeholder values
|
1524
2287
|
#
|
1525
2288
|
# resp = client.update_service({
|
1526
2289
|
# id: "ResourceId", # required
|
1527
2290
|
# service: { # required
|
1528
2291
|
# description: "ResourceDescription",
|
1529
|
-
# dns_config: {
|
2292
|
+
# dns_config: {
|
1530
2293
|
# dns_records: [ # required
|
1531
2294
|
# {
|
1532
2295
|
# type: "SRV", # required, accepts SRV, A, AAAA, CNAME
|
@@ -1568,7 +2331,7 @@ module Aws::ServiceDiscovery
|
|
1568
2331
|
params: params,
|
1569
2332
|
config: config)
|
1570
2333
|
context[:gem_name] = 'aws-sdk-servicediscovery'
|
1571
|
-
context[:gem_version] = '1.
|
2334
|
+
context[:gem_version] = '1.25.1'
|
1572
2335
|
Seahorse::Client::Request.new(handlers, context)
|
1573
2336
|
end
|
1574
2337
|
|