aws-sdk-neptune 1.45.0 → 1.47.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.
@@ -57,6 +57,9 @@ module Aws::Neptune
57
57
  # * {DBUpgradeDependencyFailureFault}
58
58
  # * {DomainNotFoundFault}
59
59
  # * {EventSubscriptionQuotaExceededFault}
60
+ # * {GlobalClusterAlreadyExistsFault}
61
+ # * {GlobalClusterNotFoundFault}
62
+ # * {GlobalClusterQuotaExceededFault}
60
63
  # * {InstanceQuotaExceededFault}
61
64
  # * {InsufficientDBClusterCapacityFault}
62
65
  # * {InsufficientDBInstanceCapacityFault}
@@ -71,6 +74,7 @@ module Aws::Neptune
71
74
  # * {InvalidDBSubnetGroupStateFault}
72
75
  # * {InvalidDBSubnetStateFault}
73
76
  # * {InvalidEventSubscriptionStateFault}
77
+ # * {InvalidGlobalClusterStateFault}
74
78
  # * {InvalidRestoreFault}
75
79
  # * {InvalidSubnet}
76
80
  # * {InvalidVPCNetworkStateFault}
@@ -397,6 +401,36 @@ module Aws::Neptune
397
401
  end
398
402
  end
399
403
 
404
+ class GlobalClusterAlreadyExistsFault < ServiceError
405
+
406
+ # @param [Seahorse::Client::RequestContext] context
407
+ # @param [String] message
408
+ # @param [Aws::Neptune::Types::GlobalClusterAlreadyExistsFault] data
409
+ def initialize(context, message, data = Aws::EmptyStructure.new)
410
+ super(context, message, data)
411
+ end
412
+ end
413
+
414
+ class GlobalClusterNotFoundFault < ServiceError
415
+
416
+ # @param [Seahorse::Client::RequestContext] context
417
+ # @param [String] message
418
+ # @param [Aws::Neptune::Types::GlobalClusterNotFoundFault] data
419
+ def initialize(context, message, data = Aws::EmptyStructure.new)
420
+ super(context, message, data)
421
+ end
422
+ end
423
+
424
+ class GlobalClusterQuotaExceededFault < ServiceError
425
+
426
+ # @param [Seahorse::Client::RequestContext] context
427
+ # @param [String] message
428
+ # @param [Aws::Neptune::Types::GlobalClusterQuotaExceededFault] data
429
+ def initialize(context, message, data = Aws::EmptyStructure.new)
430
+ super(context, message, data)
431
+ end
432
+ end
433
+
400
434
  class InstanceQuotaExceededFault < ServiceError
401
435
 
402
436
  # @param [Seahorse::Client::RequestContext] context
@@ -537,6 +571,16 @@ module Aws::Neptune
537
571
  end
538
572
  end
539
573
 
574
+ class InvalidGlobalClusterStateFault < ServiceError
575
+
576
+ # @param [Seahorse::Client::RequestContext] context
577
+ # @param [String] message
578
+ # @param [Aws::Neptune::Types::InvalidGlobalClusterStateFault] data
579
+ def initialize(context, message, data = Aws::EmptyStructure.new)
580
+ super(context, message, data)
581
+ end
582
+ end
583
+
540
584
  class InvalidRestoreFault < ServiceError
541
585
 
542
586
  # @param [Seahorse::Client::RequestContext] context
@@ -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