aws-sdk-neptune 1.46.0 → 1.47.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,22 +36,23 @@ module Aws
36
36
  context.operation.input,
37
37
  params
38
38
  )
39
- signer = Aws::Sigv4::Signer.new(
40
- service: 'rds',
39
+
40
+ endpoint_params = Aws::Neptune::EndpointParameters.new(
41
41
  region: source_region,
42
- credentials_provider: context.config.credentials
42
+ use_dual_stack: context.config.use_dualstack_endpoint,
43
+ use_fips: context.config.use_fips_endpoint
43
44
  )
44
- url = Aws::Partitions::EndpointProvider.resolve(
45
- signer.region, 'rds', 'regional',
46
- {
47
- dualstack: context.config.use_dualstack_endpoint,
48
- fips: context.config.use_fips_endpoint
49
- }
45
+ endpoint = context.config.endpoint_provider
46
+ .resolve_endpoint(endpoint_params)
47
+ auth_scheme = Aws::Endpoints.resolve_auth_scheme(context, endpoint)
48
+
49
+ signer = Aws::Plugins::Sign.signer_for(
50
+ auth_scheme, context.config, source_region
50
51
  )
51
- url += "?#{param_list}"
52
+
52
53
  signer.presign_url(
53
54
  http_method: 'GET',
54
- url: url,
55
+ url: "#{endpoint.url}?#{param_list}",
55
56
  expires_in: 3600
56
57
  ).to_s
57
58
  end
@@ -0,0 +1,206 @@
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
+
11
+ module Aws::Neptune
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::Neptune::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::Neptune::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::Neptune::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :add_role_to_db_cluster
60
+ Aws::Neptune::Endpoints::AddRoleToDBCluster.build(context)
61
+ when :add_source_identifier_to_subscription
62
+ Aws::Neptune::Endpoints::AddSourceIdentifierToSubscription.build(context)
63
+ when :add_tags_to_resource
64
+ Aws::Neptune::Endpoints::AddTagsToResource.build(context)
65
+ when :apply_pending_maintenance_action
66
+ Aws::Neptune::Endpoints::ApplyPendingMaintenanceAction.build(context)
67
+ when :copy_db_cluster_parameter_group
68
+ Aws::Neptune::Endpoints::CopyDBClusterParameterGroup.build(context)
69
+ when :copy_db_cluster_snapshot
70
+ Aws::Neptune::Endpoints::CopyDBClusterSnapshot.build(context)
71
+ when :copy_db_parameter_group
72
+ Aws::Neptune::Endpoints::CopyDBParameterGroup.build(context)
73
+ when :create_db_cluster
74
+ Aws::Neptune::Endpoints::CreateDBCluster.build(context)
75
+ when :create_db_cluster_endpoint
76
+ Aws::Neptune::Endpoints::CreateDBClusterEndpoint.build(context)
77
+ when :create_db_cluster_parameter_group
78
+ Aws::Neptune::Endpoints::CreateDBClusterParameterGroup.build(context)
79
+ when :create_db_cluster_snapshot
80
+ Aws::Neptune::Endpoints::CreateDBClusterSnapshot.build(context)
81
+ when :create_db_instance
82
+ Aws::Neptune::Endpoints::CreateDBInstance.build(context)
83
+ when :create_db_parameter_group
84
+ Aws::Neptune::Endpoints::CreateDBParameterGroup.build(context)
85
+ when :create_db_subnet_group
86
+ Aws::Neptune::Endpoints::CreateDBSubnetGroup.build(context)
87
+ when :create_event_subscription
88
+ Aws::Neptune::Endpoints::CreateEventSubscription.build(context)
89
+ when :create_global_cluster
90
+ Aws::Neptune::Endpoints::CreateGlobalCluster.build(context)
91
+ when :delete_db_cluster
92
+ Aws::Neptune::Endpoints::DeleteDBCluster.build(context)
93
+ when :delete_db_cluster_endpoint
94
+ Aws::Neptune::Endpoints::DeleteDBClusterEndpoint.build(context)
95
+ when :delete_db_cluster_parameter_group
96
+ Aws::Neptune::Endpoints::DeleteDBClusterParameterGroup.build(context)
97
+ when :delete_db_cluster_snapshot
98
+ Aws::Neptune::Endpoints::DeleteDBClusterSnapshot.build(context)
99
+ when :delete_db_instance
100
+ Aws::Neptune::Endpoints::DeleteDBInstance.build(context)
101
+ when :delete_db_parameter_group
102
+ Aws::Neptune::Endpoints::DeleteDBParameterGroup.build(context)
103
+ when :delete_db_subnet_group
104
+ Aws::Neptune::Endpoints::DeleteDBSubnetGroup.build(context)
105
+ when :delete_event_subscription
106
+ Aws::Neptune::Endpoints::DeleteEventSubscription.build(context)
107
+ when :delete_global_cluster
108
+ Aws::Neptune::Endpoints::DeleteGlobalCluster.build(context)
109
+ when :describe_db_cluster_endpoints
110
+ Aws::Neptune::Endpoints::DescribeDBClusterEndpoints.build(context)
111
+ when :describe_db_cluster_parameter_groups
112
+ Aws::Neptune::Endpoints::DescribeDBClusterParameterGroups.build(context)
113
+ when :describe_db_cluster_parameters
114
+ Aws::Neptune::Endpoints::DescribeDBClusterParameters.build(context)
115
+ when :describe_db_cluster_snapshot_attributes
116
+ Aws::Neptune::Endpoints::DescribeDBClusterSnapshotAttributes.build(context)
117
+ when :describe_db_cluster_snapshots
118
+ Aws::Neptune::Endpoints::DescribeDBClusterSnapshots.build(context)
119
+ when :describe_db_clusters
120
+ Aws::Neptune::Endpoints::DescribeDBClusters.build(context)
121
+ when :describe_db_engine_versions
122
+ Aws::Neptune::Endpoints::DescribeDBEngineVersions.build(context)
123
+ when :describe_db_instances
124
+ Aws::Neptune::Endpoints::DescribeDBInstances.build(context)
125
+ when :describe_db_parameter_groups
126
+ Aws::Neptune::Endpoints::DescribeDBParameterGroups.build(context)
127
+ when :describe_db_parameters
128
+ Aws::Neptune::Endpoints::DescribeDBParameters.build(context)
129
+ when :describe_db_subnet_groups
130
+ Aws::Neptune::Endpoints::DescribeDBSubnetGroups.build(context)
131
+ when :describe_engine_default_cluster_parameters
132
+ Aws::Neptune::Endpoints::DescribeEngineDefaultClusterParameters.build(context)
133
+ when :describe_engine_default_parameters
134
+ Aws::Neptune::Endpoints::DescribeEngineDefaultParameters.build(context)
135
+ when :describe_event_categories
136
+ Aws::Neptune::Endpoints::DescribeEventCategories.build(context)
137
+ when :describe_event_subscriptions
138
+ Aws::Neptune::Endpoints::DescribeEventSubscriptions.build(context)
139
+ when :describe_events
140
+ Aws::Neptune::Endpoints::DescribeEvents.build(context)
141
+ when :describe_global_clusters
142
+ Aws::Neptune::Endpoints::DescribeGlobalClusters.build(context)
143
+ when :describe_orderable_db_instance_options
144
+ Aws::Neptune::Endpoints::DescribeOrderableDBInstanceOptions.build(context)
145
+ when :describe_pending_maintenance_actions
146
+ Aws::Neptune::Endpoints::DescribePendingMaintenanceActions.build(context)
147
+ when :describe_valid_db_instance_modifications
148
+ Aws::Neptune::Endpoints::DescribeValidDBInstanceModifications.build(context)
149
+ when :failover_db_cluster
150
+ Aws::Neptune::Endpoints::FailoverDBCluster.build(context)
151
+ when :failover_global_cluster
152
+ Aws::Neptune::Endpoints::FailoverGlobalCluster.build(context)
153
+ when :list_tags_for_resource
154
+ Aws::Neptune::Endpoints::ListTagsForResource.build(context)
155
+ when :modify_db_cluster
156
+ Aws::Neptune::Endpoints::ModifyDBCluster.build(context)
157
+ when :modify_db_cluster_endpoint
158
+ Aws::Neptune::Endpoints::ModifyDBClusterEndpoint.build(context)
159
+ when :modify_db_cluster_parameter_group
160
+ Aws::Neptune::Endpoints::ModifyDBClusterParameterGroup.build(context)
161
+ when :modify_db_cluster_snapshot_attribute
162
+ Aws::Neptune::Endpoints::ModifyDBClusterSnapshotAttribute.build(context)
163
+ when :modify_db_instance
164
+ Aws::Neptune::Endpoints::ModifyDBInstance.build(context)
165
+ when :modify_db_parameter_group
166
+ Aws::Neptune::Endpoints::ModifyDBParameterGroup.build(context)
167
+ when :modify_db_subnet_group
168
+ Aws::Neptune::Endpoints::ModifyDBSubnetGroup.build(context)
169
+ when :modify_event_subscription
170
+ Aws::Neptune::Endpoints::ModifyEventSubscription.build(context)
171
+ when :modify_global_cluster
172
+ Aws::Neptune::Endpoints::ModifyGlobalCluster.build(context)
173
+ when :promote_read_replica_db_cluster
174
+ Aws::Neptune::Endpoints::PromoteReadReplicaDBCluster.build(context)
175
+ when :reboot_db_instance
176
+ Aws::Neptune::Endpoints::RebootDBInstance.build(context)
177
+ when :remove_from_global_cluster
178
+ Aws::Neptune::Endpoints::RemoveFromGlobalCluster.build(context)
179
+ when :remove_role_from_db_cluster
180
+ Aws::Neptune::Endpoints::RemoveRoleFromDBCluster.build(context)
181
+ when :remove_source_identifier_from_subscription
182
+ Aws::Neptune::Endpoints::RemoveSourceIdentifierFromSubscription.build(context)
183
+ when :remove_tags_from_resource
184
+ Aws::Neptune::Endpoints::RemoveTagsFromResource.build(context)
185
+ when :reset_db_cluster_parameter_group
186
+ Aws::Neptune::Endpoints::ResetDBClusterParameterGroup.build(context)
187
+ when :reset_db_parameter_group
188
+ Aws::Neptune::Endpoints::ResetDBParameterGroup.build(context)
189
+ when :restore_db_cluster_from_snapshot
190
+ Aws::Neptune::Endpoints::RestoreDBClusterFromSnapshot.build(context)
191
+ when :restore_db_cluster_to_point_in_time
192
+ Aws::Neptune::Endpoints::RestoreDBClusterToPointInTime.build(context)
193
+ when :start_db_cluster
194
+ Aws::Neptune::Endpoints::StartDBCluster.build(context)
195
+ when :stop_db_cluster
196
+ Aws::Neptune::Endpoints::StopDBCluster.build(context)
197
+ end
198
+ end
199
+ end
200
+
201
+ def add_handlers(handlers, _config)
202
+ handlers.add(Handler, step: :build, priority: 75)
203
+ end
204
+ end
205
+ end
206
+ end
@@ -13,10 +13,14 @@ require 'aws-sigv4'
13
13
 
14
14
  require_relative 'aws-sdk-neptune/types'
15
15
  require_relative 'aws-sdk-neptune/client_api'
16
+ require_relative 'aws-sdk-neptune/plugins/endpoints.rb'
16
17
  require_relative 'aws-sdk-neptune/client'
17
18
  require_relative 'aws-sdk-neptune/errors'
18
19
  require_relative 'aws-sdk-neptune/waiters'
19
20
  require_relative 'aws-sdk-neptune/resource'
21
+ require_relative 'aws-sdk-neptune/endpoint_parameters'
22
+ require_relative 'aws-sdk-neptune/endpoint_provider'
23
+ require_relative 'aws-sdk-neptune/endpoints'
20
24
  require_relative 'aws-sdk-neptune/customizations'
21
25
 
22
26
  # This module provides support for Amazon Neptune. This module is available in the
@@ -49,6 +53,6 @@ require_relative 'aws-sdk-neptune/customizations'
49
53
  # @!group service
50
54
  module Aws::Neptune
51
55
 
52
- GEM_VERSION = '1.46.0'
56
+ GEM_VERSION = '1.47.0'
53
57
 
54
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-neptune
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.46.0
4
+ version: 1.47.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-08 00:00:00.000000000 Z
11
+ date: 2022-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '3'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 3.127.0
22
+ version: 3.165.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '3'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 3.127.0
32
+ version: 3.165.0
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: aws-sigv4
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -59,8 +59,12 @@ files:
59
59
  - lib/aws-sdk-neptune/client.rb
60
60
  - lib/aws-sdk-neptune/client_api.rb
61
61
  - lib/aws-sdk-neptune/customizations.rb
62
+ - lib/aws-sdk-neptune/endpoint_parameters.rb
63
+ - lib/aws-sdk-neptune/endpoint_provider.rb
64
+ - lib/aws-sdk-neptune/endpoints.rb
62
65
  - lib/aws-sdk-neptune/errors.rb
63
66
  - lib/aws-sdk-neptune/plugins/cross_region_copying.rb
67
+ - lib/aws-sdk-neptune/plugins/endpoints.rb
64
68
  - lib/aws-sdk-neptune/resource.rb
65
69
  - lib/aws-sdk-neptune/types.rb
66
70
  - lib/aws-sdk-neptune/waiters.rb