aws-sdk-locationservice 1.23.0 → 1.25.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f9baf3628589cb756d9e91dc23595a6456e14efb5344d2f01415bbdf27f3096
4
- data.tar.gz: 330e97f7b16b30e5fc8dc01f657f57810078b5c022e09b615d96066cc486024e
3
+ metadata.gz: 8701fd12ecc09742cc633c7ec300f6d27a2ead0847c6af6acc18ed9a02d5a4e0
4
+ data.tar.gz: 3a1a2158999e580cd2bbc8cda57a448ff53bfdfd815e203d0acb545f69f0c9a6
5
5
  SHA512:
6
- metadata.gz: d538941a32333bb81fa609e42d527cbd8de09ed150e523469300a4f82624c24557a7b909d361e4aebddfbb879ced104dfc673e0178f62bf73967e9bcaa50355b
7
- data.tar.gz: 1a5d4301ba00d91853eaf2fb86bead0aa9a5a768e861f431532964c2052827ab9ee394fca146c53f822d26886d689d01320ded6fcd84e2d423c1571b9e20d480
6
+ metadata.gz: 21ff21e967983bcee05c1cd8b5cd7915502879548a5526935ca8a1ebd575268a6f0a985db3b8675456bb7791fee52468f3dadc8e38adb07ca23d1200db2b25c6
7
+ data.tar.gz: 85f704c7a21c239fe2cf857d4c1d877c16b89fc1fb22d43c150cc31276d5a47d178923e3ebfe00ca3e1482cbdad619c7fe6d07ca21da8ed459632b84cb5da687
data/CHANGELOG.md CHANGED
@@ -1,6 +1,16 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.25.0 (2022-10-25)
5
+ ------------------
6
+
7
+ * Feature - Added new map styles with satellite imagery for map resources using HERE as a data provider.
8
+
9
+ 1.24.0 (2022-09-27)
10
+ ------------------
11
+
12
+ * Feature - This release adds place IDs, which are unique identifiers of places, along with a new GetPlace operation, which can be used with place IDs to find a place again later. UnitNumber and UnitType are also added as new properties of places.
13
+
4
14
  1.23.0 (2022-08-09)
5
15
  ------------------
6
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.23.0
1
+ 1.25.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/signature_v4.rb'
33
+ require 'aws-sdk-core/plugins/sign.rb'
34
34
  require 'aws-sdk-core/plugins/protocols/rest_json.rb'
35
35
 
36
36
  Aws::Plugins::GlobalConfiguration.add_identifier(:locationservice)
@@ -79,8 +79,9 @@ module Aws::LocationService
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::SignatureV4)
82
+ add_plugin(Aws::Plugins::Sign)
83
83
  add_plugin(Aws::Plugins::Protocols::RestJson)
84
+ add_plugin(Aws::LocationService::Plugins::Endpoints)
84
85
 
85
86
  # @overload initialize(options)
86
87
  # @param [Hash] options
@@ -287,6 +288,19 @@ module Aws::LocationService
287
288
  # ** Please note ** When response stubbing is enabled, no HTTP
288
289
  # requests are made, and retries are disabled.
289
290
  #
291
+ # @option options [Aws::TokenProvider] :token_provider
292
+ # A Bearer Token Provider. This can be an instance of any one of the
293
+ # following classes:
294
+ #
295
+ # * `Aws::StaticTokenProvider` - Used for configuring static, non-refreshing
296
+ # tokens.
297
+ #
298
+ # * `Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an
299
+ # access token generated from `aws login`.
300
+ #
301
+ # When `:token_provider` is not configured directly, the `Aws::TokenProviderChain`
302
+ # will be used to search for tokens configured for your profile in shared configuration files.
303
+ #
290
304
  # @option options [Boolean] :use_dualstack_endpoint
291
305
  # When set to `true`, dualstack enabled endpoints (with `.aws` TLD)
292
306
  # will be used if available.
@@ -300,6 +314,9 @@ module Aws::LocationService
300
314
  # When `true`, request parameters are validated before
301
315
  # sending the request.
302
316
  #
317
+ # @option options [Aws::LocationService::EndpointProvider] :endpoint_provider
318
+ # The endpoint provider used to resolve endpoints. Any object that responds to `#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::LocationService::EndpointParameters`
319
+ #
303
320
  # @option options [URI::HTTP,String] :http_proxy A proxy to send
304
321
  # requests through. Formatted like 'http://proxy.com:123'.
305
322
  #
@@ -1322,7 +1339,9 @@ module Aws::LocationService
1322
1339
  # [1]: http://aws.amazon.com/service-terms
1323
1340
  #
1324
1341
  # @option params [required, Types::MapConfiguration] :configuration
1325
- # Specifies the map style selected from an available data provider.
1342
+ # Specifies the `MapConfiguration`, including the map style, for the map
1343
+ # resource that you create. The map style defines the look of maps and
1344
+ # the data provider for your map resource.
1326
1345
  #
1327
1346
  # @option params [String] :description
1328
1347
  # An optional description for the map resource.
@@ -2404,9 +2423,10 @@ module Aws::LocationService
2404
2423
  #
2405
2424
  # * VectorHereContrast – `Fira GO Regular` \| `Fira GO Bold`
2406
2425
  #
2407
- # * VectorHereExplore, VectorHereExploreTruck – `Firo GO Italic` \|
2408
- # `Fira GO Map` \| `Fira GO Map Bold` \| `Noto Sans CJK JP Bold` \|
2409
- # `Noto Sans CJK JP Light` \| `Noto Sans CJK JP Regular`
2426
+ # * VectorHereExplore, VectorHereExploreTruck,
2427
+ # HybridHereExploreSatellite – `Fira GO Italic` \| `Fira GO Map` \|
2428
+ # `Fira GO Map Bold` \| `Noto Sans CJK JP Bold` \| `Noto Sans CJK JP
2429
+ # Light` \| `Noto Sans CJK JP Regular`
2410
2430
  #
2411
2431
  #
2412
2432
  #
@@ -2461,7 +2481,7 @@ module Aws::LocationService
2461
2481
  #
2462
2482
  # * `sprites@2x.png` for high pixel density displays
2463
2483
  #
2464
- # For the JSON document contain image offsets. Use the following file
2484
+ # For the JSON document containing image offsets. Use the following file
2465
2485
  # names:
2466
2486
  #
2467
2487
  # * `sprites.json`
@@ -2581,6 +2601,91 @@ module Aws::LocationService
2581
2601
  req.send_request(options, &block)
2582
2602
  end
2583
2603
 
2604
+ # Finds a place by its unique ID. A `PlaceId` is returned by other
2605
+ # search operations.
2606
+ #
2607
+ # <note markdown="1"> A PlaceId is valid only if all of the following are the same in the
2608
+ # original search request and the call to `GetPlace`.
2609
+ #
2610
+ # * Customer AWS account
2611
+ #
2612
+ # * AWS Region
2613
+ #
2614
+ # * Data provider specified in the place index resource
2615
+ #
2616
+ # </note>
2617
+ #
2618
+ # @option params [required, String] :index_name
2619
+ # The name of the place index resource that you want to use for the
2620
+ # search.
2621
+ #
2622
+ # @option params [String] :language
2623
+ # The preferred language used to return results. The value must be a
2624
+ # valid [BCP 47][1] language tag, for example, `en` for English.
2625
+ #
2626
+ # This setting affects the languages used in the results, but not the
2627
+ # results themselves. If no language is specified, or not supported for
2628
+ # a particular result, the partner automatically chooses a language for
2629
+ # the result.
2630
+ #
2631
+ # For an example, we'll use the Greek language. You search for a
2632
+ # location around Athens, Greece, with the `language` parameter set to
2633
+ # `en`. The `city` in the results will most likely be returned as
2634
+ # `Athens`.
2635
+ #
2636
+ # If you set the `language` parameter to `el`, for Greek, then the
2637
+ # `city` in the results will more likely be returned as `Αθήνα`.
2638
+ #
2639
+ # If the data provider does not have a value for Greek, the result will
2640
+ # be in a language that the provider does support.
2641
+ #
2642
+ #
2643
+ #
2644
+ # [1]: https://tools.ietf.org/search/bcp47
2645
+ #
2646
+ # @option params [required, String] :place_id
2647
+ # The identifier of the place to find.
2648
+ #
2649
+ # @return [Types::GetPlaceResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
2650
+ #
2651
+ # * {Types::GetPlaceResponse#place #place} => Types::Place
2652
+ #
2653
+ # @example Request syntax with placeholder values
2654
+ #
2655
+ # resp = client.get_place({
2656
+ # index_name: "ResourceName", # required
2657
+ # language: "LanguageTag",
2658
+ # place_id: "PlaceId", # required
2659
+ # })
2660
+ #
2661
+ # @example Response structure
2662
+ #
2663
+ # resp.place.address_number #=> String
2664
+ # resp.place.country #=> String
2665
+ # resp.place.geometry.point #=> Array
2666
+ # resp.place.geometry.point[0] #=> Float
2667
+ # resp.place.interpolated #=> Boolean
2668
+ # resp.place.label #=> String
2669
+ # resp.place.municipality #=> String
2670
+ # resp.place.neighborhood #=> String
2671
+ # resp.place.postal_code #=> String
2672
+ # resp.place.region #=> String
2673
+ # resp.place.street #=> String
2674
+ # resp.place.sub_region #=> String
2675
+ # resp.place.time_zone.name #=> String
2676
+ # resp.place.time_zone.offset #=> Integer
2677
+ # resp.place.unit_number #=> String
2678
+ # resp.place.unit_type #=> String
2679
+ #
2680
+ # @see http://docs.aws.amazon.com/goto/WebAPI/location-2020-11-19/GetPlace AWS API Documentation
2681
+ #
2682
+ # @overload get_place(params = {})
2683
+ # @param [Hash] params ({})
2684
+ def get_place(params = {}, options = {})
2685
+ req = build_request(:get_place, params)
2686
+ req.send_request(options)
2687
+ end
2688
+
2584
2689
  # A batch request to retrieve all device positions.
2585
2690
  #
2586
2691
  # @option params [Integer] :max_results
@@ -3155,6 +3260,9 @@ module Aws::LocationService
3155
3260
  # resp.results[0].place.sub_region #=> String
3156
3261
  # resp.results[0].place.time_zone.name #=> String
3157
3262
  # resp.results[0].place.time_zone.offset #=> Integer
3263
+ # resp.results[0].place.unit_number #=> String
3264
+ # resp.results[0].place.unit_type #=> String
3265
+ # resp.results[0].place_id #=> String
3158
3266
  # resp.summary.data_source #=> String
3159
3267
  # resp.summary.language #=> String
3160
3268
  # resp.summary.max_results #=> Integer
@@ -3290,6 +3398,7 @@ module Aws::LocationService
3290
3398
  # @example Response structure
3291
3399
  #
3292
3400
  # resp.results #=> Array
3401
+ # resp.results[0].place_id #=> String
3293
3402
  # resp.results[0].text #=> String
3294
3403
  # resp.summary.bias_position #=> Array
3295
3404
  # resp.summary.bias_position[0] #=> Float
@@ -3447,6 +3556,9 @@ module Aws::LocationService
3447
3556
  # resp.results[0].place.sub_region #=> String
3448
3557
  # resp.results[0].place.time_zone.name #=> String
3449
3558
  # resp.results[0].place.time_zone.offset #=> Integer
3559
+ # resp.results[0].place.unit_number #=> String
3560
+ # resp.results[0].place.unit_type #=> String
3561
+ # resp.results[0].place_id #=> String
3450
3562
  # resp.results[0].relevance #=> Float
3451
3563
  # resp.summary.bias_position #=> Array
3452
3564
  # resp.summary.bias_position[0] #=> Float
@@ -3821,7 +3933,7 @@ module Aws::LocationService
3821
3933
  params: params,
3822
3934
  config: config)
3823
3935
  context[:gem_name] = 'aws-sdk-locationservice'
3824
- context[:gem_version] = '1.23.0'
3936
+ context[:gem_version] = '1.25.0'
3825
3937
  Seahorse::Client::Request.new(handlers, context)
3826
3938
  end
3827
3939
 
@@ -117,6 +117,7 @@ module Aws::LocationService
117
117
  DisassociateTrackerConsumerResponse = Shapes::StructureShape.new(name: 'DisassociateTrackerConsumerResponse')
118
118
  DistanceUnit = Shapes::StringShape.new(name: 'DistanceUnit')
119
119
  Double = Shapes::FloatShape.new(name: 'Double')
120
+ GeoArn = Shapes::StringShape.new(name: 'GeoArn')
120
121
  GeofenceGeometry = Shapes::StructureShape.new(name: 'GeofenceGeometry')
121
122
  GetDevicePositionHistoryRequest = Shapes::StructureShape.new(name: 'GetDevicePositionHistoryRequest')
122
123
  GetDevicePositionHistoryRequestMaxResultsInteger = Shapes::IntegerShape.new(name: 'GetDevicePositionHistoryRequestMaxResultsInteger')
@@ -138,6 +139,8 @@ module Aws::LocationService
138
139
  GetMapTileRequestYString = Shapes::StringShape.new(name: 'GetMapTileRequestYString')
139
140
  GetMapTileRequestZString = Shapes::StringShape.new(name: 'GetMapTileRequestZString')
140
141
  GetMapTileResponse = Shapes::StructureShape.new(name: 'GetMapTileResponse')
142
+ GetPlaceRequest = Shapes::StructureShape.new(name: 'GetPlaceRequest')
143
+ GetPlaceResponse = Shapes::StructureShape.new(name: 'GetPlaceResponse')
141
144
  Id = Shapes::StringShape.new(name: 'Id')
142
145
  Integer = Shapes::IntegerShape.new(name: 'Integer')
143
146
  IntendedUse = Shapes::StringShape.new(name: 'IntendedUse')
@@ -196,6 +199,7 @@ module Aws::LocationService
196
199
  MapStyle = Shapes::StringShape.new(name: 'MapStyle')
197
200
  Place = Shapes::StructureShape.new(name: 'Place')
198
201
  PlaceGeometry = Shapes::StructureShape.new(name: 'PlaceGeometry')
202
+ PlaceId = Shapes::StringShape.new(name: 'PlaceId')
199
203
  PlaceIndexSearchResultLimit = Shapes::IntegerShape.new(name: 'PlaceIndexSearchResultLimit')
200
204
  Position = Shapes::ListShape.new(name: 'Position')
201
205
  PositionFiltering = Shapes::StringShape.new(name: 'PositionFiltering')
@@ -500,7 +504,7 @@ module Aws::LocationService
500
504
  CreateMapRequest.struct_class = Types::CreateMapRequest
501
505
 
502
506
  CreateMapResponse.add_member(:create_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreateTime"))
503
- CreateMapResponse.add_member(:map_arn, Shapes::ShapeRef.new(shape: Arn, required: true, location_name: "MapArn"))
507
+ CreateMapResponse.add_member(:map_arn, Shapes::ShapeRef.new(shape: GeoArn, required: true, location_name: "MapArn"))
504
508
  CreateMapResponse.add_member(:map_name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "MapName"))
505
509
  CreateMapResponse.struct_class = Types::CreateMapResponse
506
510
 
@@ -592,7 +596,7 @@ module Aws::LocationService
592
596
  DescribeMapResponse.add_member(:create_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "CreateTime"))
593
597
  DescribeMapResponse.add_member(:data_source, Shapes::ShapeRef.new(shape: String, required: true, location_name: "DataSource"))
594
598
  DescribeMapResponse.add_member(:description, Shapes::ShapeRef.new(shape: ResourceDescription, required: true, location_name: "Description"))
595
- DescribeMapResponse.add_member(:map_arn, Shapes::ShapeRef.new(shape: Arn, required: true, location_name: "MapArn"))
599
+ DescribeMapResponse.add_member(:map_arn, Shapes::ShapeRef.new(shape: GeoArn, required: true, location_name: "MapArn"))
596
600
  DescribeMapResponse.add_member(:map_name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "MapName"))
597
601
  DescribeMapResponse.add_member(:pricing_plan, Shapes::ShapeRef.new(shape: PricingPlan, deprecated: true, location_name: "PricingPlan", metadata: {"deprecatedMessage"=>"Deprecated. Always returns RequestBasedUsage."}))
598
602
  DescribeMapResponse.add_member(:tags, Shapes::ShapeRef.new(shape: TagMap, location_name: "Tags"))
@@ -745,6 +749,14 @@ module Aws::LocationService
745
749
  GetMapTileResponse[:payload] = :blob
746
750
  GetMapTileResponse[:payload_member] = GetMapTileResponse.member(:blob)
747
751
 
752
+ GetPlaceRequest.add_member(:index_name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location: "uri", location_name: "IndexName"))
753
+ GetPlaceRequest.add_member(:language, Shapes::ShapeRef.new(shape: LanguageTag, location: "querystring", location_name: "language"))
754
+ GetPlaceRequest.add_member(:place_id, Shapes::ShapeRef.new(shape: PlaceId, required: true, location: "uri", location_name: "PlaceId"))
755
+ GetPlaceRequest.struct_class = Types::GetPlaceRequest
756
+
757
+ GetPlaceResponse.add_member(:place, Shapes::ShapeRef.new(shape: Place, required: true, location_name: "Place"))
758
+ GetPlaceResponse.struct_class = Types::GetPlaceResponse
759
+
748
760
  InternalServerException.add_member(:message, Shapes::ShapeRef.new(shape: String, required: true, location_name: "message"))
749
761
  InternalServerException.struct_class = Types::InternalServerException
750
762
 
@@ -923,6 +935,8 @@ module Aws::LocationService
923
935
  Place.add_member(:street, Shapes::ShapeRef.new(shape: String, location_name: "Street"))
924
936
  Place.add_member(:sub_region, Shapes::ShapeRef.new(shape: String, location_name: "SubRegion"))
925
937
  Place.add_member(:time_zone, Shapes::ShapeRef.new(shape: TimeZone, location_name: "TimeZone"))
938
+ Place.add_member(:unit_number, Shapes::ShapeRef.new(shape: String, location_name: "UnitNumber"))
939
+ Place.add_member(:unit_type, Shapes::ShapeRef.new(shape: String, location_name: "UnitType"))
926
940
  Place.struct_class = Types::Place
927
941
 
928
942
  PlaceGeometry.add_member(:point, Shapes::ShapeRef.new(shape: Position, location_name: "Point"))
@@ -964,10 +978,12 @@ module Aws::LocationService
964
978
 
965
979
  SearchForPositionResult.add_member(:distance, Shapes::ShapeRef.new(shape: SearchForPositionResultDistanceDouble, required: true, location_name: "Distance"))
966
980
  SearchForPositionResult.add_member(:place, Shapes::ShapeRef.new(shape: Place, required: true, location_name: "Place"))
981
+ SearchForPositionResult.add_member(:place_id, Shapes::ShapeRef.new(shape: PlaceId, location_name: "PlaceId"))
967
982
  SearchForPositionResult.struct_class = Types::SearchForPositionResult
968
983
 
969
984
  SearchForPositionResultList.member = Shapes::ShapeRef.new(shape: SearchForPositionResult)
970
985
 
986
+ SearchForSuggestionsResult.add_member(:place_id, Shapes::ShapeRef.new(shape: PlaceId, location_name: "PlaceId"))
971
987
  SearchForSuggestionsResult.add_member(:text, Shapes::ShapeRef.new(shape: String, required: true, location_name: "Text"))
972
988
  SearchForSuggestionsResult.struct_class = Types::SearchForSuggestionsResult
973
989
 
@@ -975,6 +991,7 @@ module Aws::LocationService
975
991
 
976
992
  SearchForTextResult.add_member(:distance, Shapes::ShapeRef.new(shape: SearchForTextResultDistanceDouble, location_name: "Distance"))
977
993
  SearchForTextResult.add_member(:place, Shapes::ShapeRef.new(shape: Place, required: true, location_name: "Place"))
994
+ SearchForTextResult.add_member(:place_id, Shapes::ShapeRef.new(shape: PlaceId, location_name: "PlaceId"))
978
995
  SearchForTextResult.add_member(:relevance, Shapes::ShapeRef.new(shape: SearchForTextResultRelevanceDouble, location_name: "Relevance"))
979
996
  SearchForTextResult.struct_class = Types::SearchForTextResult
980
997
 
@@ -1103,7 +1120,7 @@ module Aws::LocationService
1103
1120
  UpdateMapRequest.add_member(:pricing_plan, Shapes::ShapeRef.new(shape: PricingPlan, deprecated: true, location_name: "PricingPlan", metadata: {"deprecatedMessage"=>"Deprecated. If included, the only allowed value is RequestBasedUsage."}))
1104
1121
  UpdateMapRequest.struct_class = Types::UpdateMapRequest
1105
1122
 
1106
- UpdateMapResponse.add_member(:map_arn, Shapes::ShapeRef.new(shape: Arn, required: true, location_name: "MapArn"))
1123
+ UpdateMapResponse.add_member(:map_arn, Shapes::ShapeRef.new(shape: GeoArn, required: true, location_name: "MapArn"))
1107
1124
  UpdateMapResponse.add_member(:map_name, Shapes::ShapeRef.new(shape: ResourceName, required: true, location_name: "MapName"))
1108
1125
  UpdateMapResponse.add_member(:update_time, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "UpdateTime"))
1109
1126
  UpdateMapResponse.struct_class = Types::UpdateMapResponse
@@ -1690,6 +1707,22 @@ module Aws::LocationService
1690
1707
  o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1691
1708
  end)
1692
1709
 
1710
+ api.add_operation(:get_place, Seahorse::Model::Operation.new.tap do |o|
1711
+ o.name = "GetPlace"
1712
+ o.http_method = "GET"
1713
+ o.http_request_uri = "/places/v0/indexes/{IndexName}/places/{PlaceId}"
1714
+ o.endpoint_pattern = {
1715
+ "hostPrefix" => "places.",
1716
+ }
1717
+ o.input = Shapes::ShapeRef.new(shape: GetPlaceRequest)
1718
+ o.output = Shapes::ShapeRef.new(shape: GetPlaceResponse)
1719
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
1720
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
1721
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
1722
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
1723
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
1724
+ end)
1725
+
1693
1726
  api.add_operation(:list_device_positions, Seahorse::Model::Operation.new.tap do |o|
1694
1727
  o.name = "ListDevicePositions"
1695
1728
  o.http_method = "POST"
@@ -0,0 +1,66 @@
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::LocationService
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
+ self[:use_dual_stack] = options[:use_dual_stack]
54
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
+ if self[:use_dual_stack].nil?
56
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
+ end
58
+ self[:use_fips] = options[:use_fips]
59
+ self[:use_fips] = false if self[:use_fips].nil?
60
+ if self[:use_fips].nil?
61
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
+ end
63
+ self[:endpoint] = options[:endpoint]
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,110 @@
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::LocationService
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
30
+ RULES = <<-JSON
31
+ eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
32
+ bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOmZhbHNlLCJkb2N1bWVu
33
+ dGF0aW9uIjoiVGhlIEFXUyByZWdpb24gdXNlZCB0byBkaXNwYXRjaCB0aGUg
34
+ cmVxdWVzdC4iLCJ0eXBlIjoiU3RyaW5nIn0sIlVzZUR1YWxTdGFjayI6eyJi
35
+ dWlsdEluIjoiQVdTOjpVc2VEdWFsU3RhY2siLCJyZXF1aXJlZCI6dHJ1ZSwi
36
+ ZGVmYXVsdCI6ZmFsc2UsImRvY3VtZW50YXRpb24iOiJXaGVuIHRydWUsIHVz
37
+ ZSB0aGUgZHVhbC1zdGFjayBlbmRwb2ludC4gSWYgdGhlIGNvbmZpZ3VyZWQg
38
+ ZW5kcG9pbnQgZG9lcyBub3Qgc3VwcG9ydCBkdWFsLXN0YWNrLCBkaXNwYXRj
39
+ aGluZyB0aGUgcmVxdWVzdCBNQVkgcmV0dXJuIGFuIGVycm9yLiIsInR5cGUi
40
+ OiJCb29sZWFuIn0sIlVzZUZJUFMiOnsiYnVpbHRJbiI6IkFXUzo6VXNlRklQ
41
+ UyIsInJlcXVpcmVkIjp0cnVlLCJkZWZhdWx0IjpmYWxzZSwiZG9j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