aws-sdk-servicediscovery 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/aws-sdk-servicediscovery.rb +47 -0
- data/lib/aws-sdk-servicediscovery/client.rb +1076 -0
- data/lib/aws-sdk-servicediscovery/client_api.rb +611 -0
- data/lib/aws-sdk-servicediscovery/customizations.rb +0 -0
- data/lib/aws-sdk-servicediscovery/errors.rb +14 -0
- data/lib/aws-sdk-servicediscovery/resource.rb +23 -0
- data/lib/aws-sdk-servicediscovery/types.rb +1757 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cf56b1cca9f9816dd819f8b2722fcb8c53140719
|
4
|
+
data.tar.gz: 707abbbf692aa520d345f5eb425fcf0ecd25fdf2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 65db7f229c12e5cd14289660211d5a443e3fade44b51e9f6ecb25bd4506defd8bb155988d954e6c2f9c64b95b9e7b16b430a9cbad033a2722967d6b71f62f758
|
7
|
+
data.tar.gz: 8c8ebc580af932bb260663f95186f90ff5bc9a6f997704e16a12397c97a9c62dc5137c1e29335d4bff7314203bcc4fe85eeb6c33614fffeb6ef5e3554ea4acbc
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-servicediscovery/types'
|
12
|
+
require_relative 'aws-sdk-servicediscovery/client_api'
|
13
|
+
require_relative 'aws-sdk-servicediscovery/client'
|
14
|
+
require_relative 'aws-sdk-servicediscovery/errors'
|
15
|
+
require_relative 'aws-sdk-servicediscovery/resource'
|
16
|
+
require_relative 'aws-sdk-servicediscovery/customizations'
|
17
|
+
|
18
|
+
# This module provides support for Amazon Route 53 Auto Naming. This module is available in the
|
19
|
+
# `aws-sdk-servicediscovery` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from Amazon Route 53 Auto Naming all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::ServiceDiscovery::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::ServiceDiscovery
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,1076 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
19
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
21
|
+
require 'aws-sdk-core/plugins/jsonvalue_converter.rb'
|
22
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
23
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
24
|
+
|
25
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:servicediscovery)
|
26
|
+
|
27
|
+
module Aws::ServiceDiscovery
|
28
|
+
class Client < Seahorse::Client::Base
|
29
|
+
|
30
|
+
include Aws::ClientStubs
|
31
|
+
|
32
|
+
@identifier = :servicediscovery
|
33
|
+
|
34
|
+
set_api(ClientApi::API)
|
35
|
+
|
36
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
37
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
38
|
+
add_plugin(Aws::Plugins::Logging)
|
39
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
40
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
41
|
+
add_plugin(Aws::Plugins::UserAgent)
|
42
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
43
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
44
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
45
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
46
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::JsonvalueConverter)
|
50
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
51
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
52
|
+
|
53
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
54
|
+
# Your AWS credentials. This can be an instance of any one of the
|
55
|
+
# following classes:
|
56
|
+
#
|
57
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
58
|
+
# credentials.
|
59
|
+
#
|
60
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
61
|
+
# from an EC2 IMDS on an EC2 instance.
|
62
|
+
#
|
63
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
64
|
+
# shared file, such as `~/.aws/config`.
|
65
|
+
#
|
66
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
67
|
+
#
|
68
|
+
# When `:credentials` are not configured directly, the following
|
69
|
+
# locations will be searched for credentials:
|
70
|
+
#
|
71
|
+
# * `Aws.config[:credentials]`
|
72
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
73
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
74
|
+
# * `~/.aws/credentials`
|
75
|
+
# * `~/.aws/config`
|
76
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
77
|
+
# very aggressive. Construct and pass an instance of
|
78
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
79
|
+
# timeouts.
|
80
|
+
#
|
81
|
+
# @option options [required, String] :region
|
82
|
+
# The AWS region to connect to. The configured `:region` is
|
83
|
+
# used to determine the service `:endpoint`. When not passed,
|
84
|
+
# a default `:region` is search for in the following locations:
|
85
|
+
#
|
86
|
+
# * `Aws.config[:region]`
|
87
|
+
# * `ENV['AWS_REGION']`
|
88
|
+
# * `ENV['AMAZON_REGION']`
|
89
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
90
|
+
# * `~/.aws/credentials`
|
91
|
+
# * `~/.aws/config`
|
92
|
+
#
|
93
|
+
# @option options [String] :access_key_id
|
94
|
+
#
|
95
|
+
# @option options [Boolean] :convert_params (true)
|
96
|
+
# When `true`, an attempt is made to coerce request parameters into
|
97
|
+
# the required types.
|
98
|
+
#
|
99
|
+
# @option options [String] :endpoint
|
100
|
+
# The client endpoint is normally constructed from the `:region`
|
101
|
+
# option. You should only configure an `:endpoint` when connecting
|
102
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
103
|
+
#
|
104
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
105
|
+
# The log formatter.
|
106
|
+
#
|
107
|
+
# @option options [Symbol] :log_level (:info)
|
108
|
+
# The log level to send messages to the `:logger` at.
|
109
|
+
#
|
110
|
+
# @option options [Logger] :logger
|
111
|
+
# The Logger instance to send log messages to. If this option
|
112
|
+
# is not set, logging will be disabled.
|
113
|
+
#
|
114
|
+
# @option options [String] :profile ("default")
|
115
|
+
# Used when loading credentials from the shared credentials file
|
116
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
117
|
+
#
|
118
|
+
# @option options [Integer] :retry_limit (3)
|
119
|
+
# The maximum number of times to retry failed requests. Only
|
120
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
121
|
+
# are retried. Generally, these are throttling errors, data
|
122
|
+
# checksum errors, networking errors, timeout errors and auth
|
123
|
+
# errors from expired credentials.
|
124
|
+
#
|
125
|
+
# @option options [String] :secret_access_key
|
126
|
+
#
|
127
|
+
# @option options [String] :session_token
|
128
|
+
#
|
129
|
+
# @option options [Boolean] :simple_json (false)
|
130
|
+
# Disables request parameter conversion, validation, and formatting.
|
131
|
+
# Also disable response data type conversions. This option is useful
|
132
|
+
# when you want to ensure the highest level of performance by
|
133
|
+
# avoiding overhead of walking request parameters and response data
|
134
|
+
# structures.
|
135
|
+
#
|
136
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
137
|
+
# be formatted exactly as the DynamoDB API expects.
|
138
|
+
#
|
139
|
+
# @option options [Boolean] :stub_responses (false)
|
140
|
+
# Causes the client to return stubbed responses. By default
|
141
|
+
# fake responses are generated and returned. You can specify
|
142
|
+
# the response data to return or errors to raise by calling
|
143
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
144
|
+
#
|
145
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
146
|
+
# requests are made, and retries are disabled.
|
147
|
+
#
|
148
|
+
# @option options [Boolean] :validate_params (true)
|
149
|
+
# When `true`, request parameters are validated before
|
150
|
+
# sending the request.
|
151
|
+
#
|
152
|
+
def initialize(*args)
|
153
|
+
super
|
154
|
+
end
|
155
|
+
|
156
|
+
# @!group API Operations
|
157
|
+
|
158
|
+
# Creates a private namespace based on DNS, which will be visible only
|
159
|
+
# inside a specified Amazon VPC. The namespace defines your service
|
160
|
+
# naming scheme. For example, if you name your namespace `example.com`
|
161
|
+
# and name your service `backend`, the resulting DNS name for the
|
162
|
+
# service will be `backend.example.com`. You can associate more than one
|
163
|
+
# service with the same namespace.
|
164
|
+
#
|
165
|
+
# @option params [required, String] :name
|
166
|
+
# The name that you want to assign to this namespace. When you create a
|
167
|
+
# namespace, Amazon Route 53 automatically creates a hosted zone that
|
168
|
+
# has the same name as the namespace.
|
169
|
+
#
|
170
|
+
# @option params [String] :creator_request_id
|
171
|
+
# An optional parameter that you can use to resolve concurrent creation
|
172
|
+
# requests. `CreatorRequestId` helps to determine if a specific client
|
173
|
+
# owns the namespace.
|
174
|
+
#
|
175
|
+
# **A suitable default value is auto-generated.** You should normally
|
176
|
+
# not need to pass this option.**
|
177
|
+
#
|
178
|
+
# @option params [String] :description
|
179
|
+
# A description for the namespace.
|
180
|
+
#
|
181
|
+
# @option params [required, String] :vpc
|
182
|
+
# The ID of the Amazon VPC that you want to associate the namespace
|
183
|
+
# with.
|
184
|
+
#
|
185
|
+
# @return [Types::CreatePrivateDnsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
186
|
+
#
|
187
|
+
# * {Types::CreatePrivateDnsNamespaceResponse#operation_id #operation_id} => String
|
188
|
+
#
|
189
|
+
# @example Request syntax with placeholder values
|
190
|
+
#
|
191
|
+
# resp = client.create_private_dns_namespace({
|
192
|
+
# name: "NamespaceName", # required
|
193
|
+
# creator_request_id: "ResourceId",
|
194
|
+
# description: "ResourceDescription",
|
195
|
+
# vpc: "ResourceId", # required
|
196
|
+
# })
|
197
|
+
#
|
198
|
+
# @example Response structure
|
199
|
+
#
|
200
|
+
# resp.operation_id #=> String
|
201
|
+
#
|
202
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace AWS API Documentation
|
203
|
+
#
|
204
|
+
# @overload create_private_dns_namespace(params = {})
|
205
|
+
# @param [Hash] params ({})
|
206
|
+
def create_private_dns_namespace(params = {}, options = {})
|
207
|
+
req = build_request(:create_private_dns_namespace, params)
|
208
|
+
req.send_request(options)
|
209
|
+
end
|
210
|
+
|
211
|
+
# Creates a public namespace based on DNS, which will be visible on the
|
212
|
+
# internet. The namespace defines your service naming scheme. For
|
213
|
+
# example, if you name your namespace `example.com` and name your
|
214
|
+
# service `backend`, the resulting DNS name for the service will be
|
215
|
+
# `backend.example.com`. You can associate more than one service with
|
216
|
+
# the same namespace.
|
217
|
+
#
|
218
|
+
# @option params [required, String] :name
|
219
|
+
# The name that you want to assign to this namespace.
|
220
|
+
#
|
221
|
+
# @option params [String] :creator_request_id
|
222
|
+
# An optional parameter that you can use to resolve concurrent creation
|
223
|
+
# requests. `CreatorRequestId` helps to determine if a specific client
|
224
|
+
# owns the namespace.
|
225
|
+
#
|
226
|
+
# **A suitable default value is auto-generated.** You should normally
|
227
|
+
# not need to pass this option.**
|
228
|
+
#
|
229
|
+
# @option params [String] :description
|
230
|
+
# A description for the namespace.
|
231
|
+
#
|
232
|
+
# @return [Types::CreatePublicDnsNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
233
|
+
#
|
234
|
+
# * {Types::CreatePublicDnsNamespaceResponse#operation_id #operation_id} => String
|
235
|
+
#
|
236
|
+
# @example Request syntax with placeholder values
|
237
|
+
#
|
238
|
+
# resp = client.create_public_dns_namespace({
|
239
|
+
# name: "NamespaceName", # required
|
240
|
+
# creator_request_id: "ResourceId",
|
241
|
+
# description: "ResourceDescription",
|
242
|
+
# })
|
243
|
+
#
|
244
|
+
# @example Response structure
|
245
|
+
#
|
246
|
+
# resp.operation_id #=> String
|
247
|
+
#
|
248
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace AWS API Documentation
|
249
|
+
#
|
250
|
+
# @overload create_public_dns_namespace(params = {})
|
251
|
+
# @param [Hash] params ({})
|
252
|
+
def create_public_dns_namespace(params = {}, options = {})
|
253
|
+
req = build_request(:create_public_dns_namespace, params)
|
254
|
+
req.send_request(options)
|
255
|
+
end
|
256
|
+
|
257
|
+
# Creates a service, which defines a template for the following
|
258
|
+
# entities:
|
259
|
+
#
|
260
|
+
# * One to five resource record sets
|
261
|
+
#
|
262
|
+
# * Optionally, a health check
|
263
|
+
#
|
264
|
+
# After you create the service, you can submit a RegisterInstance
|
265
|
+
# request, and Amazon Route 53 uses the values in the template to create
|
266
|
+
# the specified entities.
|
267
|
+
#
|
268
|
+
# @option params [required, String] :name
|
269
|
+
# The name that you want to assign to the service.
|
270
|
+
#
|
271
|
+
# @option params [String] :creator_request_id
|
272
|
+
# An optional parameter that you can use to resolve concurrent creation
|
273
|
+
# requests. `CreatorRequestId` helps to determine if a specific client
|
274
|
+
# owns the namespace.
|
275
|
+
#
|
276
|
+
# **A suitable default value is auto-generated.** You should normally
|
277
|
+
# not need to pass this option.**
|
278
|
+
#
|
279
|
+
# @option params [String] :description
|
280
|
+
# A description for the service.
|
281
|
+
#
|
282
|
+
# @option params [required, Types::DnsConfig] :dns_config
|
283
|
+
# A complex type that contains information about the resource record
|
284
|
+
# sets that you want Amazon Route 53 to create when you register an
|
285
|
+
# instance.
|
286
|
+
#
|
287
|
+
# @option params [Types::HealthCheckConfig] :health_check_config
|
288
|
+
# *Public DNS namespaces only.* A complex type that contains settings
|
289
|
+
# for an optional health check. If you specify settings for a health
|
290
|
+
# check, Amazon Route 53 associates the health check with all the
|
291
|
+
# resource record sets that you specify in `DnsConfig`.
|
292
|
+
#
|
293
|
+
# <note markdown="1"> The health check uses 30 seconds as the request interval. This is the
|
294
|
+
# number of seconds between the time that each Amazon Route 53 health
|
295
|
+
# checker gets a response from your endpoint and the time that it sends
|
296
|
+
# the next health check request. A health checker in each data center
|
297
|
+
# around the world sends your endpoint a health check request every 30
|
298
|
+
# seconds. On average, your endpoint receives a health check request
|
299
|
+
# about every two seconds. Health checkers in different data centers
|
300
|
+
# don't coordinate with one another, so you'll sometimes see several
|
301
|
+
# requests per second followed by a few seconds with no health checks at
|
302
|
+
# all.
|
303
|
+
#
|
304
|
+
# </note>
|
305
|
+
#
|
306
|
+
# For information about the charges for health checks, see [Amazon Route
|
307
|
+
# 53 Pricing][1].
|
308
|
+
#
|
309
|
+
#
|
310
|
+
#
|
311
|
+
# [1]: http://aws.amazon.com/route53/pricing
|
312
|
+
#
|
313
|
+
# @return [Types::CreateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
314
|
+
#
|
315
|
+
# * {Types::CreateServiceResponse#service #service} => Types::Service
|
316
|
+
#
|
317
|
+
# @example Request syntax with placeholder values
|
318
|
+
#
|
319
|
+
# resp = client.create_service({
|
320
|
+
# name: "ServiceName", # required
|
321
|
+
# creator_request_id: "ResourceId",
|
322
|
+
# description: "ResourceDescription",
|
323
|
+
# dns_config: { # required
|
324
|
+
# namespace_id: "ResourceId", # required
|
325
|
+
# dns_records: [ # required
|
326
|
+
# {
|
327
|
+
# type: "SRV", # required, accepts SRV, A, AAAA
|
328
|
+
# ttl: 1, # required
|
329
|
+
# },
|
330
|
+
# ],
|
331
|
+
# },
|
332
|
+
# health_check_config: {
|
333
|
+
# type: "HTTP", # accepts HTTP, HTTPS, TCP
|
334
|
+
# resource_path: "ResourcePath",
|
335
|
+
# failure_threshold: 1,
|
336
|
+
# },
|
337
|
+
# })
|
338
|
+
#
|
339
|
+
# @example Response structure
|
340
|
+
#
|
341
|
+
# resp.service.id #=> String
|
342
|
+
# resp.service.arn #=> String
|
343
|
+
# resp.service.name #=> String
|
344
|
+
# resp.service.description #=> String
|
345
|
+
# resp.service.instance_count #=> Integer
|
346
|
+
# resp.service.dns_config.namespace_id #=> String
|
347
|
+
# resp.service.dns_config.dns_records #=> Array
|
348
|
+
# resp.service.dns_config.dns_records[0].type #=> String, one of "SRV", "A", "AAAA"
|
349
|
+
# resp.service.dns_config.dns_records[0].ttl #=> Integer
|
350
|
+
# resp.service.health_check_config.type #=> String, one of "HTTP", "HTTPS", "TCP"
|
351
|
+
# resp.service.health_check_config.resource_path #=> String
|
352
|
+
# resp.service.health_check_config.failure_threshold #=> Integer
|
353
|
+
# resp.service.create_date #=> Time
|
354
|
+
# resp.service.creator_request_id #=> String
|
355
|
+
#
|
356
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService AWS API Documentation
|
357
|
+
#
|
358
|
+
# @overload create_service(params = {})
|
359
|
+
# @param [Hash] params ({})
|
360
|
+
def create_service(params = {}, options = {})
|
361
|
+
req = build_request(:create_service, params)
|
362
|
+
req.send_request(options)
|
363
|
+
end
|
364
|
+
|
365
|
+
# Deletes a namespace from the current account. If the namespace still
|
366
|
+
# contains one or more services, the request fails.
|
367
|
+
#
|
368
|
+
# @option params [required, String] :id
|
369
|
+
# The ID of the namespace that you want to delete.
|
370
|
+
#
|
371
|
+
# @return [Types::DeleteNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
372
|
+
#
|
373
|
+
# * {Types::DeleteNamespaceResponse#operation_id #operation_id} => String
|
374
|
+
#
|
375
|
+
# @example Request syntax with placeholder values
|
376
|
+
#
|
377
|
+
# resp = client.delete_namespace({
|
378
|
+
# id: "ResourceId", # required
|
379
|
+
# })
|
380
|
+
#
|
381
|
+
# @example Response structure
|
382
|
+
#
|
383
|
+
# resp.operation_id #=> String
|
384
|
+
#
|
385
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace AWS API Documentation
|
386
|
+
#
|
387
|
+
# @overload delete_namespace(params = {})
|
388
|
+
# @param [Hash] params ({})
|
389
|
+
def delete_namespace(params = {}, options = {})
|
390
|
+
req = build_request(:delete_namespace, params)
|
391
|
+
req.send_request(options)
|
392
|
+
end
|
393
|
+
|
394
|
+
# Deletes a specified service. If the service still contains one or more
|
395
|
+
# registered instances, the request fails.
|
396
|
+
#
|
397
|
+
# @option params [required, String] :id
|
398
|
+
# The ID of the service that you want to delete.
|
399
|
+
#
|
400
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
401
|
+
#
|
402
|
+
# @example Request syntax with placeholder values
|
403
|
+
#
|
404
|
+
# resp = client.delete_service({
|
405
|
+
# id: "ResourceId", # required
|
406
|
+
# })
|
407
|
+
#
|
408
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService AWS API Documentation
|
409
|
+
#
|
410
|
+
# @overload delete_service(params = {})
|
411
|
+
# @param [Hash] params ({})
|
412
|
+
def delete_service(params = {}, options = {})
|
413
|
+
req = build_request(:delete_service, params)
|
414
|
+
req.send_request(options)
|
415
|
+
end
|
416
|
+
|
417
|
+
# Deletes the resource record sets and the health check, if any, that
|
418
|
+
# Amazon Route 53 created for the specified instance.
|
419
|
+
#
|
420
|
+
# @option params [required, String] :service_id
|
421
|
+
# The ID of the service that the instance is associated with.
|
422
|
+
#
|
423
|
+
# @option params [required, String] :instance_id
|
424
|
+
# The value that you specified for `Id` in the RegisterInstance request.
|
425
|
+
#
|
426
|
+
# @return [Types::DeregisterInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
427
|
+
#
|
428
|
+
# * {Types::DeregisterInstanceResponse#operation_id #operation_id} => String
|
429
|
+
#
|
430
|
+
# @example Request syntax with placeholder values
|
431
|
+
#
|
432
|
+
# resp = client.deregister_instance({
|
433
|
+
# service_id: "ResourceId", # required
|
434
|
+
# instance_id: "ResourceId", # required
|
435
|
+
# })
|
436
|
+
#
|
437
|
+
# @example Response structure
|
438
|
+
#
|
439
|
+
# resp.operation_id #=> String
|
440
|
+
#
|
441
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance AWS API Documentation
|
442
|
+
#
|
443
|
+
# @overload deregister_instance(params = {})
|
444
|
+
# @param [Hash] params ({})
|
445
|
+
def deregister_instance(params = {}, options = {})
|
446
|
+
req = build_request(:deregister_instance, params)
|
447
|
+
req.send_request(options)
|
448
|
+
end
|
449
|
+
|
450
|
+
# Gets information about a specified instance.
|
451
|
+
#
|
452
|
+
# @option params [required, String] :service_id
|
453
|
+
# The ID of the service that the instance is associated with.
|
454
|
+
#
|
455
|
+
# @option params [required, String] :instance_id
|
456
|
+
# The ID of the instance that you want to get information about.
|
457
|
+
#
|
458
|
+
# @return [Types::GetInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
459
|
+
#
|
460
|
+
# * {Types::GetInstanceResponse#instance #instance} => Types::Instance
|
461
|
+
#
|
462
|
+
# @example Request syntax with placeholder values
|
463
|
+
#
|
464
|
+
# resp = client.get_instance({
|
465
|
+
# service_id: "ResourceId", # required
|
466
|
+
# instance_id: "ResourceId", # required
|
467
|
+
# })
|
468
|
+
#
|
469
|
+
# @example Response structure
|
470
|
+
#
|
471
|
+
# resp.instance.id #=> String
|
472
|
+
# resp.instance.creator_request_id #=> String
|
473
|
+
# resp.instance.attributes #=> Hash
|
474
|
+
# resp.instance.attributes["AttrKey"] #=> String
|
475
|
+
#
|
476
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance AWS API Documentation
|
477
|
+
#
|
478
|
+
# @overload get_instance(params = {})
|
479
|
+
# @param [Hash] params ({})
|
480
|
+
def get_instance(params = {}, options = {})
|
481
|
+
req = build_request(:get_instance, params)
|
482
|
+
req.send_request(options)
|
483
|
+
end
|
484
|
+
|
485
|
+
# Gets the current health status (`Healthy`, `Unhealthy`, or `Unknown`)
|
486
|
+
# of one or more instances that are associated with a specified service.
|
487
|
+
#
|
488
|
+
# @option params [required, String] :service_id
|
489
|
+
# The ID of the service that the instance is associated with.
|
490
|
+
#
|
491
|
+
# @option params [Array<String>] :instances
|
492
|
+
# An array that contains the IDs of all the instances that you want to
|
493
|
+
# get the health status for. To get the IDs for the instances that
|
494
|
+
# you've created by using a specified service, submit a ListInstances
|
495
|
+
# request.
|
496
|
+
#
|
497
|
+
# If you omit `Instances`, Amazon Route 53 returns the health status for
|
498
|
+
# all the instances that are associated with the specified service.
|
499
|
+
#
|
500
|
+
# @option params [Integer] :max_results
|
501
|
+
# The maximum number of instances that you want Amazon Route 53 to
|
502
|
+
# return in the response to a `GetInstancesHealthStatus` request. If you
|
503
|
+
# don't specify a value for `MaxResults`, Amazon Route 53 returns up to
|
504
|
+
# 100 instances.
|
505
|
+
#
|
506
|
+
# @option params [String] :next_token
|
507
|
+
# For the first `GetInstancesHealthStatus` request, omit this value.
|
508
|
+
#
|
509
|
+
# If more than `MaxResults` instances match the specified criteria, you
|
510
|
+
# can submit another `GetInstancesHealthStatus` request to get the next
|
511
|
+
# group of results. Specify the value of `NextToken` from the previous
|
512
|
+
# response in the next request.
|
513
|
+
#
|
514
|
+
# @return [Types::GetInstancesHealthStatusResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
515
|
+
#
|
516
|
+
# * {Types::GetInstancesHealthStatusResponse#status #status} => Hash<String,String>
|
517
|
+
# * {Types::GetInstancesHealthStatusResponse#next_token #next_token} => String
|
518
|
+
#
|
519
|
+
# @example Request syntax with placeholder values
|
520
|
+
#
|
521
|
+
# resp = client.get_instances_health_status({
|
522
|
+
# service_id: "ResourceId", # required
|
523
|
+
# instances: ["ResourceId"],
|
524
|
+
# max_results: 1,
|
525
|
+
# next_token: "NextToken",
|
526
|
+
# })
|
527
|
+
#
|
528
|
+
# @example Response structure
|
529
|
+
#
|
530
|
+
# resp.status #=> Hash
|
531
|
+
# resp.status["ResourceId"] #=> String, one of "HEALTHY", "UNHEALTHY", "UNKNOWN"
|
532
|
+
# resp.next_token #=> String
|
533
|
+
#
|
534
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus AWS API Documentation
|
535
|
+
#
|
536
|
+
# @overload get_instances_health_status(params = {})
|
537
|
+
# @param [Hash] params ({})
|
538
|
+
def get_instances_health_status(params = {}, options = {})
|
539
|
+
req = build_request(:get_instances_health_status, params)
|
540
|
+
req.send_request(options)
|
541
|
+
end
|
542
|
+
|
543
|
+
# Gets information about a namespace.
|
544
|
+
#
|
545
|
+
# @option params [required, String] :id
|
546
|
+
# The ID of the namespace that you want to get information about.
|
547
|
+
#
|
548
|
+
# @return [Types::GetNamespaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
549
|
+
#
|
550
|
+
# * {Types::GetNamespaceResponse#namespace #namespace} => Types::Namespace
|
551
|
+
#
|
552
|
+
# @example Request syntax with placeholder values
|
553
|
+
#
|
554
|
+
# resp = client.get_namespace({
|
555
|
+
# id: "ResourceId", # required
|
556
|
+
# })
|
557
|
+
#
|
558
|
+
# @example Response structure
|
559
|
+
#
|
560
|
+
# resp.namespace.id #=> String
|
561
|
+
# resp.namespace.arn #=> String
|
562
|
+
# resp.namespace.name #=> String
|
563
|
+
# resp.namespace.type #=> String, one of "DNS_PUBLIC", "DNS_PRIVATE"
|
564
|
+
# resp.namespace.description #=> String
|
565
|
+
# resp.namespace.service_count #=> Integer
|
566
|
+
# resp.namespace.properties.dns_properties.hosted_zone_id #=> String
|
567
|
+
# resp.namespace.create_date #=> Time
|
568
|
+
# resp.namespace.creator_request_id #=> String
|
569
|
+
#
|
570
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace AWS API Documentation
|
571
|
+
#
|
572
|
+
# @overload get_namespace(params = {})
|
573
|
+
# @param [Hash] params ({})
|
574
|
+
def get_namespace(params = {}, options = {})
|
575
|
+
req = build_request(:get_namespace, params)
|
576
|
+
req.send_request(options)
|
577
|
+
end
|
578
|
+
|
579
|
+
# Gets information about any operation that returns an operation ID in
|
580
|
+
# the response, such as a `CreateService` request. To get a list of
|
581
|
+
# operations that match specified criteria, see ListOperations.
|
582
|
+
#
|
583
|
+
# @option params [required, String] :operation_id
|
584
|
+
# The ID of the operation that you want to get more information about.
|
585
|
+
#
|
586
|
+
# @return [Types::GetOperationResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
587
|
+
#
|
588
|
+
# * {Types::GetOperationResponse#operation #operation} => Types::Operation
|
589
|
+
#
|
590
|
+
# @example Request syntax with placeholder values
|
591
|
+
#
|
592
|
+
# resp = client.get_operation({
|
593
|
+
# operation_id: "ResourceId", # required
|
594
|
+
# })
|
595
|
+
#
|
596
|
+
# @example Response structure
|
597
|
+
#
|
598
|
+
# resp.operation.id #=> String
|
599
|
+
# resp.operation.type #=> String, one of "CREATE_NAMESPACE", "DELETE_NAMESPACE", "UPDATE_SERVICE", "REGISTER_INSTANCE", "DEREGISTER_INSTANCE"
|
600
|
+
# resp.operation.status #=> String, one of "SUBMITTED", "PENDING", "SUCCESS", "FAIL"
|
601
|
+
# resp.operation.error_message #=> String
|
602
|
+
# resp.operation.error_code #=> String
|
603
|
+
# resp.operation.create_date #=> Time
|
604
|
+
# resp.operation.update_date #=> Time
|
605
|
+
# resp.operation.targets #=> Hash
|
606
|
+
# resp.operation.targets["OperationTargetType"] #=> String
|
607
|
+
#
|
608
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation AWS API Documentation
|
609
|
+
#
|
610
|
+
# @overload get_operation(params = {})
|
611
|
+
# @param [Hash] params ({})
|
612
|
+
def get_operation(params = {}, options = {})
|
613
|
+
req = build_request(:get_operation, params)
|
614
|
+
req.send_request(options)
|
615
|
+
end
|
616
|
+
|
617
|
+
# Gets the settings for a specified service.
|
618
|
+
#
|
619
|
+
# @option params [required, String] :id
|
620
|
+
# The ID of the service that you want to get settings for.
|
621
|
+
#
|
622
|
+
# @return [Types::GetServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
623
|
+
#
|
624
|
+
# * {Types::GetServiceResponse#service #service} => Types::Service
|
625
|
+
#
|
626
|
+
# @example Request syntax with placeholder values
|
627
|
+
#
|
628
|
+
# resp = client.get_service({
|
629
|
+
# id: "ResourceId", # required
|
630
|
+
# })
|
631
|
+
#
|
632
|
+
# @example Response structure
|
633
|
+
#
|
634
|
+
# resp.service.id #=> String
|
635
|
+
# resp.service.arn #=> String
|
636
|
+
# resp.service.name #=> String
|
637
|
+
# resp.service.description #=> String
|
638
|
+
# resp.service.instance_count #=> Integer
|
639
|
+
# resp.service.dns_config.namespace_id #=> String
|
640
|
+
# resp.service.dns_config.dns_records #=> Array
|
641
|
+
# resp.service.dns_config.dns_records[0].type #=> String, one of "SRV", "A", "AAAA"
|
642
|
+
# resp.service.dns_config.dns_records[0].ttl #=> Integer
|
643
|
+
# resp.service.health_check_config.type #=> String, one of "HTTP", "HTTPS", "TCP"
|
644
|
+
# resp.service.health_check_config.resource_path #=> String
|
645
|
+
# resp.service.health_check_config.failure_threshold #=> Integer
|
646
|
+
# resp.service.create_date #=> Time
|
647
|
+
# resp.service.creator_request_id #=> String
|
648
|
+
#
|
649
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService AWS API Documentation
|
650
|
+
#
|
651
|
+
# @overload get_service(params = {})
|
652
|
+
# @param [Hash] params ({})
|
653
|
+
def get_service(params = {}, options = {})
|
654
|
+
req = build_request(:get_service, params)
|
655
|
+
req.send_request(options)
|
656
|
+
end
|
657
|
+
|
658
|
+
# Gets summary information about the instances that you created by using
|
659
|
+
# a specified service.
|
660
|
+
#
|
661
|
+
# @option params [required, String] :service_id
|
662
|
+
# The ID of the service that you want to list instances for.
|
663
|
+
#
|
664
|
+
# @option params [String] :next_token
|
665
|
+
# For the first `ListInstances` request, omit this value.
|
666
|
+
#
|
667
|
+
# If more than `MaxResults` instances match the specified criteria, you
|
668
|
+
# can submit another `ListInstances` request to get the next group of
|
669
|
+
# results. Specify the value of `NextToken` from the previous response
|
670
|
+
# in the next request.
|
671
|
+
#
|
672
|
+
# @option params [Integer] :max_results
|
673
|
+
# The maximum number of instances that you want Amazon Route 53 to
|
674
|
+
# return in the response to a `ListInstances` request. If you don't
|
675
|
+
# specify a value for `MaxResults`, Amazon Route 53 returns up to 100
|
676
|
+
# instances.
|
677
|
+
#
|
678
|
+
# @return [Types::ListInstancesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
679
|
+
#
|
680
|
+
# * {Types::ListInstancesResponse#instances #instances} => Array<Types::InstanceSummary>
|
681
|
+
# * {Types::ListInstancesResponse#next_token #next_token} => String
|
682
|
+
#
|
683
|
+
# @example Request syntax with placeholder values
|
684
|
+
#
|
685
|
+
# resp = client.list_instances({
|
686
|
+
# service_id: "ResourceId", # required
|
687
|
+
# next_token: "NextToken",
|
688
|
+
# max_results: 1,
|
689
|
+
# })
|
690
|
+
#
|
691
|
+
# @example Response structure
|
692
|
+
#
|
693
|
+
# resp.instances #=> Array
|
694
|
+
# resp.instances[0].id #=> String
|
695
|
+
# resp.instances[0].attributes #=> Hash
|
696
|
+
# resp.instances[0].attributes["AttrKey"] #=> String
|
697
|
+
# resp.next_token #=> String
|
698
|
+
#
|
699
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances AWS API Documentation
|
700
|
+
#
|
701
|
+
# @overload list_instances(params = {})
|
702
|
+
# @param [Hash] params ({})
|
703
|
+
def list_instances(params = {}, options = {})
|
704
|
+
req = build_request(:list_instances, params)
|
705
|
+
req.send_request(options)
|
706
|
+
end
|
707
|
+
|
708
|
+
# Gets information about the namespaces that were created by the current
|
709
|
+
# AWS account.
|
710
|
+
#
|
711
|
+
# @option params [String] :next_token
|
712
|
+
# For the first `ListNamespaces` request, omit this value.
|
713
|
+
#
|
714
|
+
# If more than `MaxResults` namespaces match the specified criteria, you
|
715
|
+
# can submit another `ListNamespaces` request to get the next group of
|
716
|
+
# results. Specify the value of `NextToken` from the previous response
|
717
|
+
# in the next request.
|
718
|
+
#
|
719
|
+
# @option params [Integer] :max_results
|
720
|
+
# The maximum number of namespaces that you want Amazon Route 53 to
|
721
|
+
# return in the response to a `ListNamespaces` request. If you don't
|
722
|
+
# specify a value for `MaxResults`, Amazon Route 53 returns up to 100
|
723
|
+
# namespaces.
|
724
|
+
#
|
725
|
+
# @option params [Array<Types::NamespaceFilter>] :filters
|
726
|
+
# A complex type that contains specifications for the namespaces that
|
727
|
+
# you want to list.
|
728
|
+
#
|
729
|
+
# If you specify more than one filter, an operation must match all
|
730
|
+
# filters to be returned by ListNamespaces.
|
731
|
+
#
|
732
|
+
# @return [Types::ListNamespacesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
733
|
+
#
|
734
|
+
# * {Types::ListNamespacesResponse#namespaces #namespaces} => Array<Types::NamespaceSummary>
|
735
|
+
# * {Types::ListNamespacesResponse#next_token #next_token} => String
|
736
|
+
#
|
737
|
+
# @example Request syntax with placeholder values
|
738
|
+
#
|
739
|
+
# resp = client.list_namespaces({
|
740
|
+
# next_token: "NextToken",
|
741
|
+
# max_results: 1,
|
742
|
+
# filters: [
|
743
|
+
# {
|
744
|
+
# name: "TYPE", # required, accepts TYPE
|
745
|
+
# values: ["FilterValue"], # required
|
746
|
+
# condition: "EQ", # accepts EQ, IN, BETWEEN
|
747
|
+
# },
|
748
|
+
# ],
|
749
|
+
# })
|
750
|
+
#
|
751
|
+
# @example Response structure
|
752
|
+
#
|
753
|
+
# resp.namespaces #=> Array
|
754
|
+
# resp.namespaces[0].id #=> String
|
755
|
+
# resp.namespaces[0].arn #=> String
|
756
|
+
# resp.namespaces[0].name #=> String
|
757
|
+
# resp.namespaces[0].type #=> String, one of "DNS_PUBLIC", "DNS_PRIVATE"
|
758
|
+
# resp.next_token #=> String
|
759
|
+
#
|
760
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces AWS API Documentation
|
761
|
+
#
|
762
|
+
# @overload list_namespaces(params = {})
|
763
|
+
# @param [Hash] params ({})
|
764
|
+
def list_namespaces(params = {}, options = {})
|
765
|
+
req = build_request(:list_namespaces, params)
|
766
|
+
req.send_request(options)
|
767
|
+
end
|
768
|
+
|
769
|
+
# Lists operations that match the criteria that you specify.
|
770
|
+
#
|
771
|
+
# @option params [String] :next_token
|
772
|
+
# For the first `ListOperations` request, omit this value.
|
773
|
+
#
|
774
|
+
# If more than `MaxResults` operations match the specified criteria, you
|
775
|
+
# can submit another `ListOperations` request to get the next group of
|
776
|
+
# results. Specify the value of `NextToken` from the previous response
|
777
|
+
# in the next request.
|
778
|
+
#
|
779
|
+
# @option params [Integer] :max_results
|
780
|
+
# The maximum number of items that you want Amazon Route 53 to return in
|
781
|
+
# the response to a `ListOperations` request. If you don't specify a
|
782
|
+
# value for `MaxResults`, Amazon Route 53 returns up to 100 operations.
|
783
|
+
#
|
784
|
+
# @option params [Array<Types::OperationFilter>] :filters
|
785
|
+
# A complex type that contains specifications for the operations that
|
786
|
+
# you want to list, for example, operations that you started between a
|
787
|
+
# specified start date and end date.
|
788
|
+
#
|
789
|
+
# If you specify more than one filter, an operation must match all
|
790
|
+
# filters to be returned by `ListOperations`.
|
791
|
+
#
|
792
|
+
# @return [Types::ListOperationsResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
793
|
+
#
|
794
|
+
# * {Types::ListOperationsResponse#operations #operations} => Array<Types::OperationSummary>
|
795
|
+
# * {Types::ListOperationsResponse#next_token #next_token} => String
|
796
|
+
#
|
797
|
+
# @example Request syntax with placeholder values
|
798
|
+
#
|
799
|
+
# resp = client.list_operations({
|
800
|
+
# next_token: "NextToken",
|
801
|
+
# max_results: 1,
|
802
|
+
# filters: [
|
803
|
+
# {
|
804
|
+
# name: "NAMESPACE_ID", # required, accepts NAMESPACE_ID, SERVICE_ID, STATUS, TYPE, UPDATE_DATE
|
805
|
+
# values: ["FilterValue"], # required
|
806
|
+
# condition: "EQ", # accepts EQ, IN, BETWEEN
|
807
|
+
# },
|
808
|
+
# ],
|
809
|
+
# })
|
810
|
+
#
|
811
|
+
# @example Response structure
|
812
|
+
#
|
813
|
+
# resp.operations #=> Array
|
814
|
+
# resp.operations[0].id #=> String
|
815
|
+
# resp.operations[0].status #=> String, one of "SUBMITTED", "PENDING", "SUCCESS", "FAIL"
|
816
|
+
# resp.next_token #=> String
|
817
|
+
#
|
818
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations AWS API Documentation
|
819
|
+
#
|
820
|
+
# @overload list_operations(params = {})
|
821
|
+
# @param [Hash] params ({})
|
822
|
+
def list_operations(params = {}, options = {})
|
823
|
+
req = build_request(:list_operations, params)
|
824
|
+
req.send_request(options)
|
825
|
+
end
|
826
|
+
|
827
|
+
# Gets settings for all the services that are associated with one or
|
828
|
+
# more specified namespaces.
|
829
|
+
#
|
830
|
+
# @option params [String] :next_token
|
831
|
+
# For the first `ListServices` request, omit this value.
|
832
|
+
#
|
833
|
+
# If more than `MaxResults` services match the specified criteria, you
|
834
|
+
# can submit another `ListServices` request to get the next group of
|
835
|
+
# results. Specify the value of `NextToken` from the previous response
|
836
|
+
# in the next request.
|
837
|
+
#
|
838
|
+
# @option params [Integer] :max_results
|
839
|
+
# The maximum number of services that you want Amazon Route 53 to return
|
840
|
+
# in the response to a `ListServices` request. If you don't specify a
|
841
|
+
# value for `MaxResults`, Amazon Route 53 returns up to 100 services.
|
842
|
+
#
|
843
|
+
# @option params [Array<Types::ServiceFilter>] :filters
|
844
|
+
# A complex type that contains specifications for the namespaces that
|
845
|
+
# you want to list services for.
|
846
|
+
#
|
847
|
+
# If you specify more than one filter, an operation must match all
|
848
|
+
# filters to be returned by `ListServices`.
|
849
|
+
#
|
850
|
+
# @return [Types::ListServicesResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
851
|
+
#
|
852
|
+
# * {Types::ListServicesResponse#services #services} => Array<Types::ServiceSummary>
|
853
|
+
# * {Types::ListServicesResponse#next_token #next_token} => String
|
854
|
+
#
|
855
|
+
# @example Request syntax with placeholder values
|
856
|
+
#
|
857
|
+
# resp = client.list_services({
|
858
|
+
# next_token: "NextToken",
|
859
|
+
# max_results: 1,
|
860
|
+
# filters: [
|
861
|
+
# {
|
862
|
+
# name: "NAMESPACE_ID", # required, accepts NAMESPACE_ID
|
863
|
+
# values: ["FilterValue"], # required
|
864
|
+
# condition: "EQ", # accepts EQ, IN, BETWEEN
|
865
|
+
# },
|
866
|
+
# ],
|
867
|
+
# })
|
868
|
+
#
|
869
|
+
# @example Response structure
|
870
|
+
#
|
871
|
+
# resp.services #=> Array
|
872
|
+
# resp.services[0].id #=> String
|
873
|
+
# resp.services[0].arn #=> String
|
874
|
+
# resp.services[0].name #=> String
|
875
|
+
# resp.services[0].description #=> String
|
876
|
+
# resp.services[0].instance_count #=> Integer
|
877
|
+
# resp.next_token #=> String
|
878
|
+
#
|
879
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices AWS API Documentation
|
880
|
+
#
|
881
|
+
# @overload list_services(params = {})
|
882
|
+
# @param [Hash] params ({})
|
883
|
+
def list_services(params = {}, options = {})
|
884
|
+
req = build_request(:list_services, params)
|
885
|
+
req.send_request(options)
|
886
|
+
end
|
887
|
+
|
888
|
+
# Creates one or more resource record sets and optionally a health check
|
889
|
+
# based on the settings in a specified service. When you submit a
|
890
|
+
# `RegisterInstance` request, Amazon Route 53 does the following:
|
891
|
+
#
|
892
|
+
# * Creates a resource record set for each resource record set template
|
893
|
+
# in the service
|
894
|
+
#
|
895
|
+
# * Creates a health check based on the settings in the health check
|
896
|
+
# template in the service, if any
|
897
|
+
#
|
898
|
+
# * Associates the health check, if any, with each of the resource
|
899
|
+
# record sets
|
900
|
+
#
|
901
|
+
# One `RegisterInstance` request must complete before you can submit
|
902
|
+
# another request and specify the same service and instance ID.
|
903
|
+
#
|
904
|
+
# For more information, see CreateService.
|
905
|
+
#
|
906
|
+
# When Amazon Route 53 receives a DNS query for the specified DNS name,
|
907
|
+
# it returns the applicable value:
|
908
|
+
#
|
909
|
+
# * **If the health check is healthy**\: returns all the resource record
|
910
|
+
# sets
|
911
|
+
#
|
912
|
+
# * **If the health check is unhealthy**\: returns the IP address of the
|
913
|
+
# last healthy instance
|
914
|
+
#
|
915
|
+
# * **If you didn't specify a health check template**\: returns all the
|
916
|
+
# resource record sets
|
917
|
+
#
|
918
|
+
# @option params [required, String] :service_id
|
919
|
+
# The ID of the service that you want to use for settings for the
|
920
|
+
# resource record sets and health check that Amazon Route 53 will
|
921
|
+
# create.
|
922
|
+
#
|
923
|
+
# @option params [required, String] :instance_id
|
924
|
+
# An identifier that you want to associate with the instance. Note the
|
925
|
+
# following:
|
926
|
+
#
|
927
|
+
# * You can use this value to update an existing instance.
|
928
|
+
#
|
929
|
+
# * To register a new instance, you must specify a value that is unique
|
930
|
+
# among instances that you register by using the same service.
|
931
|
+
#
|
932
|
+
# @option params [String] :creator_request_id
|
933
|
+
# An optional parameter that you can use to resolve concurrent creation
|
934
|
+
# requests. `CreatorRequestId` helps to determine if a specific client
|
935
|
+
# owns the namespace.
|
936
|
+
#
|
937
|
+
# **A suitable default value is auto-generated.** You should normally
|
938
|
+
# not need to pass this option.**
|
939
|
+
#
|
940
|
+
# @option params [required, Hash<String,String>] :attributes
|
941
|
+
# A string map that contain attribute keys and values. Supported
|
942
|
+
# attribute keys include the following:
|
943
|
+
#
|
944
|
+
# * `AWS_INSTANCE_PORT`\: The port on the endpoint that you want Amazon
|
945
|
+
# Route 53 to perform health checks on. This value is also used for
|
946
|
+
# the port value in an SRV record if the service that you specify
|
947
|
+
# includes an SRV record. For more information, see CreateService.
|
948
|
+
#
|
949
|
+
# * `AWS_INSTANCE_IPV4`\: If the service that you specify contains a
|
950
|
+
# resource record set template for an A record, the IPv4 address that
|
951
|
+
# you want Amazon Route 53 to use for the value of the A record.
|
952
|
+
#
|
953
|
+
# * `AWS_INSTANCE_IPV6`\: If the service that you specify contains a
|
954
|
+
# resource record set template for an AAAA record, the IPv6 address
|
955
|
+
# that you want Amazon Route 53 to use for the value of the AAAA
|
956
|
+
# record.
|
957
|
+
#
|
958
|
+
# @return [Types::RegisterInstanceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
959
|
+
#
|
960
|
+
# * {Types::RegisterInstanceResponse#operation_id #operation_id} => String
|
961
|
+
#
|
962
|
+
# @example Request syntax with placeholder values
|
963
|
+
#
|
964
|
+
# resp = client.register_instance({
|
965
|
+
# service_id: "ResourceId", # required
|
966
|
+
# instance_id: "ResourceId", # required
|
967
|
+
# creator_request_id: "ResourceId",
|
968
|
+
# attributes: { # required
|
969
|
+
# "AttrKey" => "AttrValue",
|
970
|
+
# },
|
971
|
+
# })
|
972
|
+
#
|
973
|
+
# @example Response structure
|
974
|
+
#
|
975
|
+
# resp.operation_id #=> String
|
976
|
+
#
|
977
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance AWS API Documentation
|
978
|
+
#
|
979
|
+
# @overload register_instance(params = {})
|
980
|
+
# @param [Hash] params ({})
|
981
|
+
def register_instance(params = {}, options = {})
|
982
|
+
req = build_request(:register_instance, params)
|
983
|
+
req.send_request(options)
|
984
|
+
end
|
985
|
+
|
986
|
+
# Updates the TTL setting for a specified service. You must specify all
|
987
|
+
# the resource record set templates (and, optionally, a health check
|
988
|
+
# template) that you want to appear in the updated service. Any current
|
989
|
+
# resource record set templates (or health check template) that don't
|
990
|
+
# appear in an `UpdateService` request are deleted.
|
991
|
+
#
|
992
|
+
# When you update the TTL setting for a service, Amazon Route 53 also
|
993
|
+
# updates the corresponding settings in all the resource record sets and
|
994
|
+
# health checks that were created by using the specified service.
|
995
|
+
#
|
996
|
+
# @option params [required, String] :id
|
997
|
+
# The ID of the service that you want to update.
|
998
|
+
#
|
999
|
+
# @option params [required, Types::ServiceChange] :service
|
1000
|
+
# A complex type that contains the new settings for the service.
|
1001
|
+
#
|
1002
|
+
# @return [Types::UpdateServiceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1003
|
+
#
|
1004
|
+
# * {Types::UpdateServiceResponse#operation_id #operation_id} => String
|
1005
|
+
#
|
1006
|
+
# @example Request syntax with placeholder values
|
1007
|
+
#
|
1008
|
+
# resp = client.update_service({
|
1009
|
+
# id: "ResourceId", # required
|
1010
|
+
# service: { # required
|
1011
|
+
# description: "ResourceDescription",
|
1012
|
+
# dns_config: { # required
|
1013
|
+
# dns_records: [ # required
|
1014
|
+
# {
|
1015
|
+
# type: "SRV", # required, accepts SRV, A, AAAA
|
1016
|
+
# ttl: 1, # required
|
1017
|
+
# },
|
1018
|
+
# ],
|
1019
|
+
# },
|
1020
|
+
# health_check_config: {
|
1021
|
+
# type: "HTTP", # accepts HTTP, HTTPS, TCP
|
1022
|
+
# resource_path: "ResourcePath",
|
1023
|
+
# failure_threshold: 1,
|
1024
|
+
# },
|
1025
|
+
# },
|
1026
|
+
# })
|
1027
|
+
#
|
1028
|
+
# @example Response structure
|
1029
|
+
#
|
1030
|
+
# resp.operation_id #=> String
|
1031
|
+
#
|
1032
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService AWS API Documentation
|
1033
|
+
#
|
1034
|
+
# @overload update_service(params = {})
|
1035
|
+
# @param [Hash] params ({})
|
1036
|
+
def update_service(params = {}, options = {})
|
1037
|
+
req = build_request(:update_service, params)
|
1038
|
+
req.send_request(options)
|
1039
|
+
end
|
1040
|
+
|
1041
|
+
# @!endgroup
|
1042
|
+
|
1043
|
+
# @param params ({})
|
1044
|
+
# @api private
|
1045
|
+
def build_request(operation_name, params = {})
|
1046
|
+
handlers = @handlers.for(operation_name)
|
1047
|
+
context = Seahorse::Client::RequestContext.new(
|
1048
|
+
operation_name: operation_name,
|
1049
|
+
operation: config.api.operation(operation_name),
|
1050
|
+
client: self,
|
1051
|
+
params: params,
|
1052
|
+
config: config)
|
1053
|
+
context[:gem_name] = 'aws-sdk-servicediscovery'
|
1054
|
+
context[:gem_version] = '1.0.0'
|
1055
|
+
Seahorse::Client::Request.new(handlers, context)
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
# @api private
|
1059
|
+
# @deprecated
|
1060
|
+
def waiter_names
|
1061
|
+
[]
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
class << self
|
1065
|
+
|
1066
|
+
# @api private
|
1067
|
+
attr_reader :identifier
|
1068
|
+
|
1069
|
+
# @api private
|
1070
|
+
def errors_module
|
1071
|
+
Errors
|
1072
|
+
end
|
1073
|
+
|
1074
|
+
end
|
1075
|
+
end
|
1076
|
+
end
|