aws-sdk-servicediscovery 1.46.0 → 1.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-servicediscovery/client.rb +76 -33
- data/lib/aws-sdk-servicediscovery/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-servicediscovery/endpoint_provider.rb +121 -0
- data/lib/aws-sdk-servicediscovery/endpoints.rb +379 -0
- data/lib/aws-sdk-servicediscovery/plugins/endpoints.rb +120 -0
- data/lib/aws-sdk-servicediscovery/types.rb +154 -114
- data/lib/aws-sdk-servicediscovery.rb +5 -1
- metadata +8 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5278a123f145a2e3e7a6a4e92db9b087110f9c7e665de8e7df72dcacd01fee21
|
4
|
+
data.tar.gz: ba82743473ec3b2b954201a91b5cc0b4078566c39cdb117f15ec240e2cbd353a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c25b4c5f704e51a4d901dc2fbdc08816412f626898dcd16e0ad96d80517caf3de5e2c462b714ef8a43b4e7a841e46a3fe55884191813a5a585485950f4ee072
|
7
|
+
data.tar.gz: 64716e49b435e0f437b64801fce1ef5a3683a415c8cce90bbfe8102de37453aca8d8cf45c6235f492fc8604a43893343ad4a384cf5baeea0600479fc3370f245
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.48.0 (2022-10-25)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.47.0 (2022-10-18)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Updated the ListNamespaces API to support the NAME and HTTP_NAME filters, and the BEGINS_WITH filter condition.
|
13
|
+
|
4
14
|
1.46.0 (2022-02-24)
|
5
15
|
------------------
|
6
16
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.48.0
|
@@ -30,7 +30,7 @@ require 'aws-sdk-core/plugins/http_checksum.rb'
|
|
30
30
|
require 'aws-sdk-core/plugins/checksum_algorithm.rb'
|
31
31
|
require 'aws-sdk-core/plugins/defaults_mode.rb'
|
32
32
|
require 'aws-sdk-core/plugins/recursion_detection.rb'
|
33
|
-
require 'aws-sdk-core/plugins/
|
33
|
+
require 'aws-sdk-core/plugins/sign.rb'
|
34
34
|
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
35
35
|
|
36
36
|
Aws::Plugins::GlobalConfiguration.add_identifier(:servicediscovery)
|
@@ -79,8 +79,9 @@ module Aws::ServiceDiscovery
|
|
79
79
|
add_plugin(Aws::Plugins::ChecksumAlgorithm)
|
80
80
|
add_plugin(Aws::Plugins::DefaultsMode)
|
81
81
|
add_plugin(Aws::Plugins::RecursionDetection)
|
82
|
-
add_plugin(Aws::Plugins::
|
82
|
+
add_plugin(Aws::Plugins::Sign)
|
83
83
|
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
84
|
+
add_plugin(Aws::ServiceDiscovery::Plugins::Endpoints)
|
84
85
|
|
85
86
|
# @overload initialize(options)
|
86
87
|
# @param [Hash] options
|
@@ -297,6 +298,19 @@ module Aws::ServiceDiscovery
|
|
297
298
|
# ** Please note ** When response stubbing is enabled, no HTTP
|
298
299
|
# requests are made, and retries are disabled.
|
299
300
|
#
|
301
|
+
# @option options [Aws::TokenProvider] :token_provider
|
302
|
+
# A Bearer Token Provider. This can be an instance of any one of the
|
303
|
+
# following classes:
|
304
|
+
#
|
305
|
+
# * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
|
306
|
+
# tokens.
|
307
|
+
#
|
308
|
+
# * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
|
309
|
+
# access token generated from `aws login`.
|
310
|
+
#
|
311
|
+
# When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
|
312
|
+
# will be used to search for tokens configured for your profile in shared configuration files.
|
313
|
+
#
|
300
314
|
# @option options [Boolean] :use_dualstack_endpoint
|
301
315
|
# When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
|
302
316
|
# will be used if available.
|
@@ -310,6 +324,9 @@ module Aws::ServiceDiscovery
|
|
310
324
|
# When `true`, request parameters are validated before
|
311
325
|
# sending the request.
|
312
326
|
#
|
327
|
+
# @option options [Aws::ServiceDiscovery::EndpointProvider] :endpoint_provider
|
328
|
+
# The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::ServiceDiscovery::EndpointParameters`
|
329
|
+
#
|
313
330
|
# @option options [URI::HTTP,String] :http_proxy A proxy to send
|
314
331
|
# requests through. Formatted like 'http://proxy.com:123'.
|
315
332
|
#
|
@@ -366,8 +383,8 @@ module Aws::ServiceDiscovery
|
|
366
383
|
# can't be discovered using DNS.
|
367
384
|
#
|
368
385
|
# For the current quota on the number of namespaces that you can create
|
369
|
-
# using the same account, see [Cloud Map quotas][1]
|
370
|
-
# Developer Guide*.
|
386
|
+
# using the same Amazon Web Services account, see [Cloud Map quotas][1]
|
387
|
+
# in the *Cloud Map Developer Guide*.
|
371
388
|
#
|
372
389
|
#
|
373
390
|
#
|
@@ -447,8 +464,9 @@ module Aws::ServiceDiscovery
|
|
447
464
|
# `backend.example.com`. Service instances that are registered using a
|
448
465
|
# private DNS namespace can be discovered using either a
|
449
466
|
# `DiscoverInstances` request or using DNS. For the current quota on the
|
450
|
-
# number of namespaces that you can create using the same
|
451
|
-
# [Cloud Map quotas][1] in the *Cloud Map
|
467
|
+
# number of namespaces that you can create using the same Amazon Web
|
468
|
+
# Services account, see [Cloud Map quotas][1] in the *Cloud Map
|
469
|
+
# Developer Guide*.
|
452
470
|
#
|
453
471
|
#
|
454
472
|
#
|
@@ -456,8 +474,8 @@ module Aws::ServiceDiscovery
|
|
456
474
|
#
|
457
475
|
# @option params [required, String] :name
|
458
476
|
# The name that you want to assign to this namespace. When you create a
|
459
|
-
# private DNS namespace, Cloud Map automatically creates an Amazon
|
460
|
-
# 53 private hosted zone that has the same name as the namespace.
|
477
|
+
# private DNS namespace, Cloud Map automatically creates an Amazon
|
478
|
+
# Route 53 private hosted zone that has the same name as the namespace.
|
461
479
|
#
|
462
480
|
# @option params [String] :creator_request_id
|
463
481
|
# A unique string that identifies the request and that allows failed
|
@@ -545,8 +563,11 @@ module Aws::ServiceDiscovery
|
|
545
563
|
# `backend.example.com`. You can discover instances that were registered
|
546
564
|
# with a public DNS namespace by using either a `DiscoverInstances`
|
547
565
|
# request or using DNS. For the current quota on the number of
|
548
|
-
# namespaces that you can create using the same
|
549
|
-
# quotas][1] in the *Cloud Map Developer Guide*.
|
566
|
+
# namespaces that you can create using the same Amazon Web Services
|
567
|
+
# account, see [Cloud Map quotas][1] in the *Cloud Map Developer Guide*.
|
568
|
+
#
|
569
|
+
# The `CreatePublicDnsNamespace` API operation is not supported in the
|
570
|
+
# Amazon Web Services GovCloud (US) Regions.
|
550
571
|
#
|
551
572
|
#
|
552
573
|
#
|
@@ -555,6 +576,11 @@ module Aws::ServiceDiscovery
|
|
555
576
|
# @option params [required, String] :name
|
556
577
|
# The name that you want to assign to this namespace.
|
557
578
|
#
|
579
|
+
# <note markdown="1"> Do not include sensitive information in the name. The name is publicly
|
580
|
+
# available using DNS queries.
|
581
|
+
#
|
582
|
+
# </note>
|
583
|
+
#
|
558
584
|
# @option params [String] :creator_request_id
|
559
585
|
# A unique string that identifies the request and that allows failed
|
560
586
|
# `CreatePublicDnsNamespace` requests to be retried without the risk of
|
@@ -633,7 +659,7 @@ module Aws::ServiceDiscovery
|
|
633
659
|
# following entities:
|
634
660
|
#
|
635
661
|
# * For public and private DNS namespaces, one of the following
|
636
|
-
# combinations of DNS records in Amazon Route
|
662
|
+
# combinations of DNS records in Amazon Route 53:
|
637
663
|
#
|
638
664
|
# * `A`
|
639
665
|
#
|
@@ -663,6 +689,11 @@ module Aws::ServiceDiscovery
|
|
663
689
|
# @option params [required, String] :name
|
664
690
|
# The name that you want to assign to the service.
|
665
691
|
#
|
692
|
+
# <note markdown="1"> Do not include sensitive information in the name if the namespace is
|
693
|
+
# discoverable by public DNS queries.
|
694
|
+
#
|
695
|
+
# </note>
|
696
|
+
#
|
666
697
|
# If you want Cloud Map to create an `SRV` record when you register an
|
667
698
|
# instance and you're using a system that requires a specific `SRV`
|
668
699
|
# format, such as [HAProxy][1], specify the following for `Name`\:
|
@@ -708,15 +739,15 @@ module Aws::ServiceDiscovery
|
|
708
739
|
# A description for the service.
|
709
740
|
#
|
710
741
|
# @option params [Types::DnsConfig] :dns_config
|
711
|
-
# A complex type that contains information about the Amazon Route
|
742
|
+
# A complex type that contains information about the Amazon Route 53
|
712
743
|
# records that you want Cloud Map to create when you register an
|
713
744
|
# instance.
|
714
745
|
#
|
715
746
|
# @option params [Types::HealthCheckConfig] :health_check_config
|
716
747
|
# *Public DNS and HTTP namespaces only.* A complex type that contains
|
717
|
-
# settings for an optional Route
|
748
|
+
# settings for an optional Route 53 health check. If you specify
|
718
749
|
# settings for a health check, Cloud Map associates the health check
|
719
|
-
# with all the Route
|
750
|
+
# with all the Route 53 DNS records that you specify in `DnsConfig`.
|
720
751
|
#
|
721
752
|
# If you specify a health check configuration, you can specify either
|
722
753
|
# `HealthCheckCustomConfig` or `HealthCheckConfig` but not both.
|
@@ -938,7 +969,7 @@ module Aws::ServiceDiscovery
|
|
938
969
|
req.send_request(options)
|
939
970
|
end
|
940
971
|
|
941
|
-
# Deletes the Amazon Route
|
972
|
+
# Deletes the Amazon Route 53 DNS records and health check, if any, that
|
942
973
|
# Cloud Map created for the specified instance.
|
943
974
|
#
|
944
975
|
# @option params [required, String] :service_id
|
@@ -1280,7 +1311,7 @@ module Aws::ServiceDiscovery
|
|
1280
1311
|
# resp.to_h outputs the following:
|
1281
1312
|
# {
|
1282
1313
|
# namespace: {
|
1283
|
-
# arn: "arn:aws:servicediscovery:us-west-2:
|
1314
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-e1tpmexample0001",
|
1284
1315
|
# create_date: Time.parse("20181118T211712Z"),
|
1285
1316
|
# creator_request_id: "example-creator-request-id-0001",
|
1286
1317
|
# description: "Example.com AWS Cloud Map HTTP Namespace",
|
@@ -1416,7 +1447,7 @@ module Aws::ServiceDiscovery
|
|
1416
1447
|
# resp.to_h outputs the following:
|
1417
1448
|
# {
|
1418
1449
|
# service: {
|
1419
|
-
# arn: "arn:aws:servicediscovery:us-west-2:
|
1450
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
1420
1451
|
# create_date: Time.parse("20181118T211707Z"),
|
1421
1452
|
# creator_request_id: "example-creator-request-id-0004",
|
1422
1453
|
# description: "Example.com AWS Cloud Map HTTP Service",
|
@@ -1541,7 +1572,7 @@ module Aws::ServiceDiscovery
|
|
1541
1572
|
end
|
1542
1573
|
|
1543
1574
|
# Lists summary information about the namespaces that were created by
|
1544
|
-
# the current account.
|
1575
|
+
# the current Amazon Web Services account.
|
1545
1576
|
#
|
1546
1577
|
# @option params [String] :next_token
|
1547
1578
|
# For the first `ListNamespaces` request, omit this value.
|
@@ -1643,9 +1674,9 @@ module Aws::ServiceDiscovery
|
|
1643
1674
|
# max_results: 1,
|
1644
1675
|
# filters: [
|
1645
1676
|
# {
|
1646
|
-
# name: "TYPE", # required, accepts TYPE
|
1677
|
+
# name: "TYPE", # required, accepts TYPE, NAME, HTTP_NAME
|
1647
1678
|
# values: ["FilterValue"], # required
|
1648
|
-
# condition: "EQ", # accepts EQ, IN, BETWEEN
|
1679
|
+
# condition: "EQ", # accepts EQ, IN, BETWEEN, BEGINS_WITH
|
1649
1680
|
# },
|
1650
1681
|
# ],
|
1651
1682
|
# })
|
@@ -1756,7 +1787,7 @@ module Aws::ServiceDiscovery
|
|
1756
1787
|
# {
|
1757
1788
|
# name: "NAMESPACE_ID", # required, accepts NAMESPACE_ID, SERVICE_ID, STATUS, TYPE, UPDATE_DATE
|
1758
1789
|
# values: ["FilterValue"], # required
|
1759
|
-
# condition: "EQ", # accepts EQ, IN, BETWEEN
|
1790
|
+
# condition: "EQ", # accepts EQ, IN, BETWEEN, BEGINS_WITH
|
1760
1791
|
# },
|
1761
1792
|
# ],
|
1762
1793
|
# })
|
@@ -1852,7 +1883,7 @@ module Aws::ServiceDiscovery
|
|
1852
1883
|
# {
|
1853
1884
|
# name: "NAMESPACE_ID", # required, accepts NAMESPACE_ID
|
1854
1885
|
# values: ["FilterValue"], # required
|
1855
|
-
# condition: "EQ", # accepts EQ, IN, BETWEEN
|
1886
|
+
# condition: "EQ", # accepts EQ, IN, BETWEEN, BEGINS_WITH
|
1856
1887
|
# },
|
1857
1888
|
# ],
|
1858
1889
|
# })
|
@@ -2008,6 +2039,13 @@ module Aws::ServiceDiscovery
|
|
2008
2039
|
#
|
2009
2040
|
# </note>
|
2010
2041
|
#
|
2042
|
+
# <note markdown="1"> Do not include sensitive information in `InstanceId` if the namespace
|
2043
|
+
# is discoverable by public DNS queries and any `Type` member of
|
2044
|
+
# `DnsRecord` for the service contains `SRV` because the `InstanceId` is
|
2045
|
+
# discoverable by public DNS queries.
|
2046
|
+
#
|
2047
|
+
# </note>
|
2048
|
+
#
|
2011
2049
|
#
|
2012
2050
|
#
|
2013
2051
|
# [1]: https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type
|
@@ -2033,15 +2071,20 @@ module Aws::ServiceDiscovery
|
|
2033
2071
|
#
|
2034
2072
|
# * For each attribute, the applicable value.
|
2035
2073
|
#
|
2074
|
+
# <note markdown="1"> Do not include sensitive information in the attributes if the
|
2075
|
+
# namespace is discoverable by public DNS queries.
|
2076
|
+
#
|
2077
|
+
# </note>
|
2078
|
+
#
|
2036
2079
|
# Supported attribute keys include the following:
|
2037
2080
|
#
|
2038
2081
|
# AWS\_ALIAS\_DNS\_NAME
|
2039
2082
|
#
|
2040
|
-
# : If you want Cloud Map to create an Amazon Route
|
2083
|
+
# : If you want Cloud Map to create an Amazon Route 53 alias record that
|
2041
2084
|
# routes traffic to an Elastic Load Balancing load balancer, specify
|
2042
2085
|
# the DNS name that's associated with the load balancer. For
|
2043
2086
|
# information about how to get the DNS name, see "DNSName" in the
|
2044
|
-
# topic [AliasTarget][1] in the *Route
|
2087
|
+
# topic [AliasTarget][1] in the *Route 53 API Reference*.
|
2045
2088
|
#
|
2046
2089
|
# Note the following:
|
2047
2090
|
#
|
@@ -2053,7 +2096,7 @@ module Aws::ServiceDiscovery
|
|
2053
2096
|
# `RoutingPolicy` must be `WEIGHTED`.
|
2054
2097
|
#
|
2055
2098
|
# * If the service that's specified by `ServiceId` includes
|
2056
|
-
# `HealthCheckConfig` settings, Cloud Map will create the Route
|
2099
|
+
# `HealthCheckConfig` settings, Cloud Map will create the Route 53
|
2057
2100
|
# health check, but it doesn't associate the health check with the
|
2058
2101
|
# alias record.
|
2059
2102
|
#
|
@@ -2084,7 +2127,7 @@ module Aws::ServiceDiscovery
|
|
2084
2127
|
# AWS\_INSTANCE\_CNAME
|
2085
2128
|
#
|
2086
2129
|
# : If the service configuration includes a `CNAME` record, the domain
|
2087
|
-
# name that you want Route
|
2130
|
+
# name that you want Route 53 to return in response to DNS queries
|
2088
2131
|
# (for example, `example.com`).
|
2089
2132
|
#
|
2090
2133
|
# This value is required if the service specified by `ServiceId`
|
@@ -2093,7 +2136,7 @@ module Aws::ServiceDiscovery
|
|
2093
2136
|
# AWS\_INSTANCE\_IPV4
|
2094
2137
|
#
|
2095
2138
|
# : If the service configuration includes an `A` record, the IPv4
|
2096
|
-
# address that you want Route
|
2139
|
+
# address that you want Route 53 to return in response to DNS queries
|
2097
2140
|
# (for example, `192.0.2.44`).
|
2098
2141
|
#
|
2099
2142
|
# This value is required if the service specified by `ServiceId`
|
@@ -2104,7 +2147,7 @@ module Aws::ServiceDiscovery
|
|
2104
2147
|
# AWS\_INSTANCE\_IPV6
|
2105
2148
|
#
|
2106
2149
|
# : If the service configuration includes an `AAAA` record, the IPv6
|
2107
|
-
# address that you want Route
|
2150
|
+
# address that you want Route 53 to return in response to DNS queries
|
2108
2151
|
# (for example, `2001:0db8:85a3:0000:0000:abcd:0001:2345`).
|
2109
2152
|
#
|
2110
2153
|
# This value is required if the service specified by `ServiceId`
|
@@ -2115,13 +2158,13 @@ module Aws::ServiceDiscovery
|
|
2115
2158
|
# AWS\_INSTANCE\_PORT
|
2116
2159
|
#
|
2117
2160
|
# : If the service includes an `SRV` record, the value that you want
|
2118
|
-
# Route
|
2161
|
+
# Route 53 to return for the port.
|
2119
2162
|
#
|
2120
2163
|
# If the service includes `HealthCheckConfig`, the port on the
|
2121
|
-
# endpoint that you want Route
|
2164
|
+
# endpoint that you want Route 53 to send requests to.
|
2122
2165
|
#
|
2123
2166
|
# This value is required if you specified settings for an `SRV` record
|
2124
|
-
# or a Route
|
2167
|
+
# or a Route 53 health check when you created the service.
|
2125
2168
|
#
|
2126
2169
|
# Custom attributes
|
2127
2170
|
#
|
@@ -2334,7 +2377,7 @@ module Aws::ServiceDiscovery
|
|
2334
2377
|
# You can use `UpdateInstanceCustomHealthStatus` to change the status
|
2335
2378
|
# only for custom health checks, which you define using
|
2336
2379
|
# `HealthCheckCustomConfig` when you create a service. You can't use it
|
2337
|
-
# to change the status for Route
|
2380
|
+
# to change the status for Route 53 health checks, which you define
|
2338
2381
|
# using `HealthCheckConfig`.
|
2339
2382
|
#
|
2340
2383
|
# For more information, see [HealthCheckCustomConfig][1].
|
@@ -2598,7 +2641,7 @@ module Aws::ServiceDiscovery
|
|
2598
2641
|
params: params,
|
2599
2642
|
config: config)
|
2600
2643
|
context[:gem_name] = 'aws-sdk-servicediscovery'
|
2601
|
-
context[:gem_version] = '1.
|
2644
|
+
context[:gem_version] = '1.48.0'
|
2602
2645
|
Seahorse::Client::Request.new(handlers, context)
|
2603
2646
|
end
|
2604
2647
|
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::ServiceDiscovery
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
if self[:region].nil?
|
54
|
+
raise ArgumentError, "Missing required EndpointParameter: :region"
|
55
|
+
end
|
56
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
57
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
58
|
+
if self[:use_dual_stack].nil?
|
59
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
60
|
+
end
|
61
|
+
self[:use_fips] = options[:use_fips]
|
62
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
63
|
+
if self[:use_fips].nil?
|
64
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
65
|
+
end
|
66
|
+
self[:endpoint] = options[:endpoint]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,121 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::ServiceDiscovery
|
11
|
+
class EndpointProvider
|
12
|
+
def initialize(rule_set = nil)
|
13
|
+
@@rule_set ||= begin
|
14
|
+
endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
|
15
|
+
Aws::Endpoints::RuleSet.new(
|
16
|
+
version: endpoint_rules['version'],
|
17
|
+
service_id: endpoint_rules['serviceId'],
|
18
|
+
parameters: endpoint_rules['parameters'],
|
19
|
+
rules: endpoint_rules['rules']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
@provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve_endpoint(parameters)
|
26
|
+
@provider.resolve_endpoint(parameters)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
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