aws-sdk-docdb 1.26.0 → 1.27.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9f3c2a08f1c743f21dcdd57daa895e245b59e501b9f58d1ea4d8fb432ef6a87
4
- data.tar.gz: 929a2b88c64bb10db486c5708c6e57356cdd8201ef17d1e98b12f6f21a5c1a40
3
+ metadata.gz: 935d4281c9928da301f3335928b984c21d61bfc0c5e87576687d5c5e358a2828
4
+ data.tar.gz: a1032acf3a2572abfe970c5e37fa4cbd40633fae4d1983638207098be9434fb8
5
5
  SHA512:
6
- metadata.gz: 8c3768d9a04aa43e5bb81db2442cc6ea96434b98a52fa5471cd2f74f9c39d618c9eb298c94405f8497e133e778ab2c93b74766e0c9fa574b5ff55472b000c2d1
7
- data.tar.gz: cd92d30f51a2d6b3a96af8b595bd8c1978435b5a3a285e489a117c097c775416e694d457b1f753229a4bf994337774af3b4d8a93000a84351a2683e92f23de0c
6
+ metadata.gz: bf00ef31a82b3cba643a12477b3d9b692cdbe98146ad5ea36937cfc1b20ad07a89c6b81a284cf12428ac183e05a4a5227f90d495db3ab341ed0e88db1af48575
7
+ data.tar.gz: cbadb52070a7657e1b46f5b9f9a46ad8339792f2234a800bff6256af58237ab2297de10b70ce8c8f239f201c0f23c78937d9292784cf357e432ec0e80be96c01
@@ -49,6 +49,6 @@ require_relative 'aws-sdk-docdb/customizations'
49
49
  # @!group service
50
50
  module Aws::DocDB
51
51
 
52
- GEM_VERSION = '1.26.0'
52
+ GEM_VERSION = '1.27.0'
53
53
 
54
54
  end
@@ -29,6 +29,7 @@ require 'aws-sdk-core/plugins/transfer_encoding.rb'
29
29
  require 'aws-sdk-core/plugins/http_checksum.rb'
30
30
  require 'aws-sdk-core/plugins/signature_v4.rb'
31
31
  require 'aws-sdk-core/plugins/protocols/query.rb'
32
+ require 'aws-sdk-docdb/plugins/cross_region_copying.rb'
32
33
 
33
34
  Aws::Plugins::GlobalConfiguration.add_identifier(:docdb)
34
35
 
@@ -75,6 +76,7 @@ module Aws::DocDB
75
76
  add_plugin(Aws::Plugins::HttpChecksum)
76
77
  add_plugin(Aws::Plugins::SignatureV4)
77
78
  add_plugin(Aws::Plugins::Protocols::Query)
79
+ add_plugin(Aws::DocDB::Plugins::CrossRegionCopying)
78
80
 
79
81
  # @overload initialize(options)
80
82
  # @param [Hash] options
@@ -599,6 +601,10 @@ module Aws::DocDB
599
601
  # @option params [Array<Types::Tag>] :tags
600
602
  # The tags to be assigned to the cluster snapshot.
601
603
  #
604
+ # @option params [String] :source_region
605
+ # The source region of the snapshot. This is only needed when the
606
+ # shapshot is encrypted and in a different region.
607
+ #
602
608
  # @return [Types::CopyDBClusterSnapshotResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
603
609
  #
604
610
  # * {Types::CopyDBClusterSnapshotResult#db_cluster_snapshot #db_cluster_snapshot} => Types::DBClusterSnapshot
@@ -617,6 +623,7 @@ module Aws::DocDB
617
623
  # value: "String",
618
624
  # },
619
625
  # ],
626
+ # source_region: "String",
620
627
  # })
621
628
  #
622
629
  # @example Response structure
@@ -807,6 +814,10 @@ module Aws::DocDB
807
814
  # `DeletionProtection` is disabled. `DeletionProtection` protects
808
815
  # clusters from being accidentally deleted.
809
816
  #
817
+ # @option params [String] :source_region
818
+ # The source region of the snapshot. This is only needed when the
819
+ # shapshot is encrypted and in a different region.
820
+ #
810
821
  # @return [Types::CreateDBClusterResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
811
822
  #
812
823
  # * {Types::CreateDBClusterResult#db_cluster #db_cluster} => Types::DBCluster
@@ -838,6 +849,7 @@ module Aws::DocDB
838
849
  # pre_signed_url: "String",
839
850
  # enable_cloudwatch_logs_exports: ["String"],
840
851
  # deletion_protection: false,
852
+ # source_region: "String",
841
853
  # })
842
854
  #
843
855
  # @example Response structure
@@ -4270,7 +4282,7 @@ module Aws::DocDB
4270
4282
  params: params,
4271
4283
  config: config)
4272
4284
  context[:gem_name] = 'aws-sdk-docdb'
4273
- context[:gem_version] = '1.26.0'
4285
+ context[:gem_version] = '1.27.0'
4274
4286
  Seahorse::Client::Request.new(handlers, context)
4275
4287
  end
4276
4288
 
@@ -263,6 +263,7 @@ module Aws::DocDB
263
263
  CopyDBClusterSnapshotMessage.add_member(:pre_signed_url, Shapes::ShapeRef.new(shape: String, location_name: "PreSignedUrl"))
264
264
  CopyDBClusterSnapshotMessage.add_member(:copy_tags, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "CopyTags"))
265
265
  CopyDBClusterSnapshotMessage.add_member(:tags, Shapes::ShapeRef.new(shape: TagList, location_name: "Tags"))
266
+ CopyDBClusterSnapshotMessage.add_member(:source_region, Shapes::ShapeRef.new(shape: String, location_name: "SourceRegion"))
266
267
  CopyDBClusterSnapshotMessage.struct_class = Types::CopyDBClusterSnapshotMessage
267
268
 
268
269
  CopyDBClusterSnapshotResult.add_member(:db_cluster_snapshot, Shapes::ShapeRef.new(shape: DBClusterSnapshot, location_name: "DBClusterSnapshot"))
@@ -287,6 +288,7 @@ module Aws::DocDB
287
288
  CreateDBClusterMessage.add_member(:pre_signed_url, Shapes::ShapeRef.new(shape: String, location_name: "PreSignedUrl"))
288
289
  CreateDBClusterMessage.add_member(:enable_cloudwatch_logs_exports, Shapes::ShapeRef.new(shape: LogTypeList, location_name: "EnableCloudwatchLogsExports"))
289
290
  CreateDBClusterMessage.add_member(:deletion_protection, Shapes::ShapeRef.new(shape: BooleanOptional, location_name: "DeletionProtection"))
291
+ CreateDBClusterMessage.add_member(:source_region, Shapes::ShapeRef.new(shape: String, location_name: "SourceRegion"))
290
292
  CreateDBClusterMessage.struct_class = Types::CreateDBClusterMessage
291
293
 
292
294
  CreateDBClusterParameterGroupMessage.add_member(:db_cluster_parameter_group_name, Shapes::ShapeRef.new(shape: String, required: true, location_name: "DBClusterParameterGroupName"))
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'aws-sigv4'
4
+
5
+ module Aws
6
+ module DocDB
7
+ module Plugins
8
+ # This plugin populates the `:pre_signed_url` request param for APIs
9
+ # that support cross region copying.
10
+ #
11
+ # This parameter is required by RDS when copying an encrypted snapshot
12
+ # across regions. This plugin will be skipped if the `:pre_signed_url`
13
+ # parameter is provided by the user.
14
+ class CrossRegionCopying < Seahorse::Client::Plugin
15
+ # @api private
16
+ class Handler < Seahorse::Client::Handler
17
+ def call(context)
18
+ params = context.params
19
+ if params.is_a?(Hash) &&
20
+ params[:source_region] && !params[:pre_signed_url]
21
+ params[:pre_signed_url] = presigned_url(context, params)
22
+ end
23
+ @handler.call(context)
24
+ end
25
+
26
+ private
27
+
28
+ def presigned_url(context, params)
29
+ # :source_region is not modeled in the api
30
+ source_region = params.delete(:source_region)
31
+ param_list = Aws::Query::ParamList.new
32
+ param_list.set('Action', context.operation.name)
33
+ param_list.set('DestinationRegion', context.config.region)
34
+ param_list.set('Version', context.config.api.version)
35
+ Aws::Query::ParamBuilder.new(param_list).apply(
36
+ context.operation.input,
37
+ params
38
+ )
39
+ signer = Aws::Sigv4::Signer.new(
40
+ service: 'rds',
41
+ region: source_region,
42
+ credentials_provider: context.config.credentials
43
+ )
44
+ url = Aws::Partitions::EndpointProvider.resolve(
45
+ signer.region, 'rds'
46
+ )
47
+ url += "?#{param_list}"
48
+ signer.presign_url(
49
+ http_method: 'GET',
50
+ url: url,
51
+ expires_in: 3600
52
+ ).to_s
53
+ end
54
+ end
55
+
56
+ handler(
57
+ Handler,
58
+ step: :initialize,
59
+ operations: [
60
+ :copy_db_cluster_snapshot,
61
+ :create_db_cluster
62
+ ]
63
+ )
64
+ end
65
+ end
66
+ end
67
+ end
@@ -334,6 +334,7 @@ module Aws::DocDB
334
334
  # value: "String",
335
335
  # },
336
336
  # ],
337
+ # source_region: "String",
337
338
  # }
338
339
  #
339
340
  # @!attribute [rw] source_db_cluster_snapshot_identifier
@@ -438,6 +439,11 @@ module Aws::DocDB
438
439
  # The tags to be assigned to the cluster snapshot.
439
440
  # @return [Array<Types::Tag>]
440
441
  #
442
+ # @!attribute [rw] source_region
443
+ # The source region of the snapshot. This is only needed when the
444
+ # shapshot is encrypted and in a different region.
445
+ # @return [String]
446
+ #
441
447
  # @see http://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CopyDBClusterSnapshotMessage AWS API Documentation
442
448
  #
443
449
  class CopyDBClusterSnapshotMessage < Struct.new(
@@ -446,7 +452,8 @@ module Aws::DocDB
446
452
  :kms_key_id,
447
453
  :pre_signed_url,
448
454
  :copy_tags,
449
- :tags)
455
+ :tags,
456
+ :source_region)
450
457
  SENSITIVE = []
451
458
  include Aws::Structure
452
459
  end
@@ -493,6 +500,7 @@ module Aws::DocDB
493
500
  # pre_signed_url: "String",
494
501
  # enable_cloudwatch_logs_exports: ["String"],
495
502
  # deletion_protection: false,
503
+ # source_region: "String",
496
504
  # }
497
505
  #
498
506
  # @!attribute [rw] availability_zones
@@ -671,6 +679,11 @@ module Aws::DocDB
671
679
  # deleted.
672
680
  # @return [Boolean]
673
681
  #
682
+ # @!attribute [rw] source_region
683
+ # The source region of the snapshot. This is only needed when the
684
+ # shapshot is encrypted and in a different region.
685
+ # @return [String]
686
+ #
674
687
  # @see http://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterMessage AWS API Documentation
675
688
  #
676
689
  class CreateDBClusterMessage < Struct.new(
@@ -692,7 +705,8 @@ module Aws::DocDB
692
705
  :kms_key_id,
693
706
  :pre_signed_url,
694
707
  :enable_cloudwatch_logs_exports,
695
- :deletion_protection)
708
+ :deletion_protection,
709
+ :source_region)
696
710
  SENSITIVE = []
697
711
  include Aws::Structure
698
712
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-docdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.0
4
+ version: 1.27.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: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core
@@ -57,6 +57,7 @@ files:
57
57
  - lib/aws-sdk-docdb/client_api.rb
58
58
  - lib/aws-sdk-docdb/customizations.rb
59
59
  - lib/aws-sdk-docdb/errors.rb
60
+ - lib/aws-sdk-docdb/plugins/cross_region_copying.rb
60
61
  - lib/aws-sdk-docdb/resource.rb
61
62
  - lib/aws-sdk-docdb/types.rb
62
63
  - lib/aws-sdk-docdb/waiters.rb