aws-sdk-docdb 1.23.0 → 1.28.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 +4 -4
- data/lib/aws-sdk-docdb.rb +1 -1
- data/lib/aws-sdk-docdb/client.rb +20 -14
- data/lib/aws-sdk-docdb/client_api.rb +2 -0
- data/lib/aws-sdk-docdb/plugins/cross_region_copying.rb +67 -0
- data/lib/aws-sdk-docdb/types.rb +23 -15
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9135f3129d8f85c62464e8e33c6c1c0f94913bd7ac876a7b4b8fec606199ec4e
|
4
|
+
data.tar.gz: e0a6e3b0f77e83eafe61355d95b5ac44bc739a4d20625edaf49e7672f5bba135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9be722db8c3f714e96405be65aeabeb4ecde74ca1a0b2970dba1d0a22485754442f2fc121b83c56bbe951675b493a6dc2d68115d90622041c59cd04578ee098d
|
7
|
+
data.tar.gz: 93704e6bc402ba3dd2e5d21c097b6d358d3d51b739bd18365cb09e72ec6b8b6b4ee960930adc0ead77d952d8b41b5c1b3e546a3fc1a867920244d009a9a4b66e
|
data/lib/aws-sdk-docdb.rb
CHANGED
data/lib/aws-sdk-docdb/client.rb
CHANGED
@@ -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
|
@@ -702,7 +709,10 @@ module Aws::DocDB
|
|
702
709
|
# Valid values: `docdb`
|
703
710
|
#
|
704
711
|
# @option params [String] :engine_version
|
705
|
-
# The version number of the database engine to use.
|
712
|
+
# The version number of the database engine to use. The --engine-version
|
713
|
+
# will default to the latest major engine version. For production
|
714
|
+
# workloads, we recommend explicitly declaring this parameter with the
|
715
|
+
# intended major engine version.
|
706
716
|
#
|
707
717
|
# @option params [Integer] :port
|
708
718
|
# The port number on which the instances in the cluster accept
|
@@ -775,24 +785,15 @@ module Aws::DocDB
|
|
775
785
|
#
|
776
786
|
# If an encryption key is not specified in `KmsKeyId`\:
|
777
787
|
#
|
778
|
-
# * If `
|
779
|
-
# then Amazon DocumentDB uses the encryption key that is used to
|
780
|
-
# encrypt the source. Otherwise, Amazon DocumentDB uses your default
|
781
|
-
# encryption key.
|
782
|
-
#
|
783
|
-
# * If the `StorageEncrypted` parameter is `true` and
|
784
|
-
# `ReplicationSourceIdentifier` is not specified, Amazon DocumentDB
|
788
|
+
# * If the `StorageEncrypted` parameter is `true`, Amazon DocumentDB
|
785
789
|
# uses your default encryption key.
|
786
790
|
#
|
791
|
+
# ^
|
792
|
+
#
|
787
793
|
# AWS KMS creates the default encryption key for your AWS account. Your
|
788
794
|
# AWS account has a different default encryption key for each AWS
|
789
795
|
# Region.
|
790
796
|
#
|
791
|
-
# If you create a replica of an encrypted cluster in another AWS Region,
|
792
|
-
# you must set `KmsKeyId` to a KMS key ID that is valid in the
|
793
|
-
# destination AWS Region. This key is used to encrypt the replica in
|
794
|
-
# that AWS Region.
|
795
|
-
#
|
796
797
|
# @option params [String] :pre_signed_url
|
797
798
|
# Not currently supported.
|
798
799
|
#
|
@@ -813,6 +814,10 @@ module Aws::DocDB
|
|
813
814
|
# `DeletionProtection` is disabled. `DeletionProtection` protects
|
814
815
|
# clusters from being accidentally deleted.
|
815
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
|
+
#
|
816
821
|
# @return [Types::CreateDBClusterResult] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
817
822
|
#
|
818
823
|
# * {Types::CreateDBClusterResult#db_cluster #db_cluster} => Types::DBCluster
|
@@ -844,6 +849,7 @@ module Aws::DocDB
|
|
844
849
|
# pre_signed_url: "String",
|
845
850
|
# enable_cloudwatch_logs_exports: ["String"],
|
846
851
|
# deletion_protection: false,
|
852
|
+
# source_region: "String",
|
847
853
|
# })
|
848
854
|
#
|
849
855
|
# @example Response structure
|
@@ -4276,7 +4282,7 @@ module Aws::DocDB
|
|
4276
4282
|
params: params,
|
4277
4283
|
config: config)
|
4278
4284
|
context[:gem_name] = 'aws-sdk-docdb'
|
4279
|
-
context[:gem_version] = '1.
|
4285
|
+
context[:gem_version] = '1.28.0'
|
4280
4286
|
Seahorse::Client::Request.new(handlers, context)
|
4281
4287
|
end
|
4282
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
|
data/lib/aws-sdk-docdb/types.rb
CHANGED
@@ -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
|
@@ -553,7 +561,10 @@ module Aws::DocDB
|
|
553
561
|
# @return [String]
|
554
562
|
#
|
555
563
|
# @!attribute [rw] engine_version
|
556
|
-
# The version number of the database engine to use.
|
564
|
+
# The version number of the database engine to use. The
|
565
|
+
# --engine-version will default to the latest major engine version.
|
566
|
+
# For production workloads, we recommend explicitly declaring this
|
567
|
+
# parameter with the intended major engine version.
|
557
568
|
# @return [String]
|
558
569
|
#
|
559
570
|
# @!attribute [rw] port
|
@@ -634,23 +645,14 @@ module Aws::DocDB
|
|
634
645
|
#
|
635
646
|
# If an encryption key is not specified in `KmsKeyId`\:
|
636
647
|
#
|
637
|
-
# * If `
|
638
|
-
# then Amazon DocumentDB uses the encryption key that is used to
|
639
|
-
# encrypt the source. Otherwise, Amazon DocumentDB uses your default
|
640
|
-
# encryption key.
|
641
|
-
#
|
642
|
-
# * If the `StorageEncrypted` parameter is `true` and
|
643
|
-
# `ReplicationSourceIdentifier` is not specified, Amazon DocumentDB
|
648
|
+
# * If the `StorageEncrypted` parameter is `true`, Amazon DocumentDB
|
644
649
|
# uses your default encryption key.
|
645
650
|
#
|
651
|
+
# ^
|
652
|
+
#
|
646
653
|
# AWS KMS creates the default encryption key for your AWS account.
|
647
654
|
# Your AWS account has a different default encryption key for each AWS
|
648
655
|
# Region.
|
649
|
-
#
|
650
|
-
# If you create a replica of an encrypted cluster in another AWS
|
651
|
-
# Region, you must set `KmsKeyId` to a KMS key ID that is valid in the
|
652
|
-
# destination AWS Region. This key is used to encrypt the replica in
|
653
|
-
# that AWS Region.
|
654
656
|
# @return [String]
|
655
657
|
#
|
656
658
|
# @!attribute [rw] pre_signed_url
|
@@ -677,6 +679,11 @@ module Aws::DocDB
|
|
677
679
|
# deleted.
|
678
680
|
# @return [Boolean]
|
679
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
|
+
#
|
680
687
|
# @see http://docs.aws.amazon.com/goto/WebAPI/docdb-2014-10-31/CreateDBClusterMessage AWS API Documentation
|
681
688
|
#
|
682
689
|
class CreateDBClusterMessage < Struct.new(
|
@@ -698,7 +705,8 @@ module Aws::DocDB
|
|
698
705
|
:kms_key_id,
|
699
706
|
:pre_signed_url,
|
700
707
|
:enable_cloudwatch_logs_exports,
|
701
|
-
:deletion_protection
|
708
|
+
:deletion_protection,
|
709
|
+
:source_region)
|
702
710
|
SENSITIVE = []
|
703
711
|
include Aws::Structure
|
704
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.
|
4
|
+
version: 1.28.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:
|
11
|
+
date: 2021-02-02 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.
|
22
|
+
version: 3.112.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.
|
32
|
+
version: 3.112.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: aws-sigv4
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|