aws-sdk-s3 1.101.0 → 1.105.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-s3/arn/access_point_arn.rb +6 -6
- data/lib/aws-sdk-s3/arn/multi_region_access_point_arn.rb +68 -0
- data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +6 -6
- data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +7 -6
- data/lib/aws-sdk-s3/bucket.rb +5 -5
- data/lib/aws-sdk-s3/client.rb +289 -270
- data/lib/aws-sdk-s3/client_api.rb +3 -0
- data/lib/aws-sdk-s3/object.rb +18 -18
- data/lib/aws-sdk-s3/object_summary.rb +12 -12
- data/lib/aws-sdk-s3/plugins/accelerate.rb +1 -1
- data/lib/aws-sdk-s3/plugins/arn.rb +59 -33
- data/lib/aws-sdk-s3/plugins/bucket_dns.rb +1 -1
- data/lib/aws-sdk-s3/plugins/dualstack.rb +25 -31
- data/lib/aws-sdk-s3/plugins/s3_signer.rb +29 -5
- data/lib/aws-sdk-s3/presigner.rb +6 -0
- data/lib/aws-sdk-s3/types.rb +78 -57
- data/lib/aws-sdk-s3.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3570e4d131d777fc468050c52e0c742650eac6f7ba0642303a09a62cca1e0c03
|
4
|
+
data.tar.gz: f9bbe42b3c4c7f772d499a83334ce234c62eeed8fd3e752a4b3dcbc70972f1d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 023fc37fe1dd4f1315892fa933c5095e55c2a70cfb170ef195c62024a8e1533688dfec9f09550127937434f28acbfe618968c302eafb6a0deeeb700de2a22a8e
|
7
|
+
data.tar.gz: 9949a6da8a8ce2ebc73415516a3344398a90b14c0d55c013360e4ecfac488cdef3550b950777738baebd999a3ccc41091e5a1d6704893fe9f32a29af7a61bed1
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
Unreleased Changes
|
2
2
|
------------------
|
3
3
|
|
4
|
+
1.105.0 (2021-11-04)
|
5
|
+
------------------
|
6
|
+
|
7
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
8
|
+
|
9
|
+
1.104.0 (2021-10-18)
|
10
|
+
------------------
|
11
|
+
|
12
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
13
|
+
|
14
|
+
1.103.0 (2021-09-16)
|
15
|
+
------------------
|
16
|
+
|
17
|
+
* Feature - Add support for access point arn filtering in S3 CW Request Metrics
|
18
|
+
|
19
|
+
1.102.0 (2021-09-02)
|
20
|
+
------------------
|
21
|
+
|
22
|
+
* Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
|
23
|
+
|
4
24
|
1.101.0 (2021-09-01)
|
5
25
|
------------------
|
6
26
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.105.0
|
@@ -25,25 +25,25 @@ module Aws
|
|
25
25
|
if @region.empty? || @account_id.empty?
|
26
26
|
raise ArgumentError,
|
27
27
|
'S3 Access Point ARNs must contain both a region '\
|
28
|
-
'and an account
|
28
|
+
'and an account ID.'
|
29
29
|
end
|
30
30
|
|
31
31
|
if @region.include?('-fips') || @region.include?('fips-')
|
32
32
|
raise ArgumentError,
|
33
|
-
'S3 Access Point ARNs cannot contain a FIPS region'
|
33
|
+
'S3 Access Point ARNs cannot contain a FIPS region.'
|
34
34
|
end
|
35
35
|
|
36
36
|
if @type != 'accesspoint'
|
37
|
-
raise ArgumentError, 'Invalid ARN, resource format is not correct'
|
37
|
+
raise ArgumentError, 'Invalid ARN, resource format is not correct.'
|
38
38
|
end
|
39
39
|
|
40
40
|
if @access_point_name.nil? || @access_point_name.empty?
|
41
|
-
raise ArgumentError, 'Missing ARN
|
41
|
+
raise ArgumentError, 'Missing ARN Access Point name.'
|
42
42
|
end
|
43
43
|
|
44
44
|
if @extra
|
45
45
|
raise ArgumentError,
|
46
|
-
'ARN
|
46
|
+
'ARN Access Point resource must be a single value.'
|
47
47
|
end
|
48
48
|
|
49
49
|
unless Seahorse::Util.host_label?(
|
@@ -60,7 +60,7 @@ module Aws
|
|
60
60
|
if custom_endpoint
|
61
61
|
"#{pfx}.#{custom_endpoint}"
|
62
62
|
else
|
63
|
-
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
|
63
|
+
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3')
|
64
64
|
"#{pfx}.s3-accesspoint#{'-fips' if fips}#{'.dualstack' if dualstack}.#{region}.#{sfx}"
|
65
65
|
end
|
66
66
|
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Aws
|
4
|
+
module S3
|
5
|
+
# @api private
|
6
|
+
class MultiRegionAccessPointARN < Aws::ARN
|
7
|
+
def initialize(options)
|
8
|
+
super(options)
|
9
|
+
@type, @mrap_alias, @extra = @resource.split(/[:,\/]/)
|
10
|
+
end
|
11
|
+
|
12
|
+
attr_reader :mrap_alias
|
13
|
+
|
14
|
+
def support_dualstack?
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def support_fips?
|
19
|
+
false
|
20
|
+
end
|
21
|
+
|
22
|
+
def validate_arn!
|
23
|
+
unless @service == 's3'
|
24
|
+
raise ArgumentError,
|
25
|
+
'Must provide a valid S3 multi-region access point ARN.'
|
26
|
+
end
|
27
|
+
|
28
|
+
if @account_id.empty?
|
29
|
+
raise ArgumentError,
|
30
|
+
'S3 multi-region access point ARNs must contain '\
|
31
|
+
'an account id.'
|
32
|
+
end
|
33
|
+
|
34
|
+
unless @region.empty?
|
35
|
+
raise ArgumentError,
|
36
|
+
'Multi-region access points must have an empty region.'
|
37
|
+
end
|
38
|
+
|
39
|
+
if @type != 'accesspoint'
|
40
|
+
raise ArgumentError, 'Invalid ARN, resource format is not correct'
|
41
|
+
end
|
42
|
+
|
43
|
+
if @mrap_alias.nil? || @mrap_alias.empty?
|
44
|
+
raise ArgumentError, 'Missing ARN multi-region access points alias.'
|
45
|
+
end
|
46
|
+
|
47
|
+
unless @mrap_alias.split('.').all? { |s| Seahorse::Util.host_label?(s) }
|
48
|
+
raise ArgumentError, "#{@mrap_alias} is not a valid "\
|
49
|
+
'multi region access point alias.'
|
50
|
+
end
|
51
|
+
|
52
|
+
if @extra
|
53
|
+
raise ArgumentError,
|
54
|
+
'ARN access point resource must be a single value.'
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def host_url(_region, _fips = false, _dualstack = false, custom_endpoint = nil)
|
59
|
+
if custom_endpoint
|
60
|
+
"#{@mrap_alias}.#{custom_endpoint}"
|
61
|
+
else
|
62
|
+
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(@partition, 's3')
|
63
|
+
"#{@mrap_alias}.accesspoint.s3-global.#{sfx}"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -19,18 +19,18 @@ module Aws
|
|
19
19
|
|
20
20
|
def validate_arn!
|
21
21
|
unless @service == 's3-object-lambda'
|
22
|
-
raise ArgumentError, 'Must provide a valid S3 Object
|
22
|
+
raise ArgumentError, 'Must provide a valid S3 Object Lambda ARN.'
|
23
23
|
end
|
24
24
|
|
25
25
|
if @region.empty? || @account_id.empty?
|
26
26
|
raise ArgumentError,
|
27
27
|
'S3 Object Lambdas ARNs must contain both a region '\
|
28
|
-
'and an account
|
28
|
+
'and an account ID.'
|
29
29
|
end
|
30
30
|
|
31
31
|
if @region.include?('-fips') || @region.include?('fips-')
|
32
32
|
raise ArgumentError,
|
33
|
-
'S3
|
33
|
+
'S3 Object Lambda ARNs cannot contain a FIPS region'
|
34
34
|
end
|
35
35
|
|
36
36
|
if @type != 'accesspoint'
|
@@ -38,12 +38,12 @@ module Aws
|
|
38
38
|
end
|
39
39
|
|
40
40
|
if @access_point_name.nil? || @access_point_name.empty?
|
41
|
-
raise ArgumentError, 'Missing ARN
|
41
|
+
raise ArgumentError, 'Missing ARN Access Point name.'
|
42
42
|
end
|
43
43
|
|
44
44
|
if @extra
|
45
45
|
raise ArgumentError,
|
46
|
-
'ARN
|
46
|
+
'ARN Access Point resource must be a single value.'
|
47
47
|
end
|
48
48
|
|
49
49
|
unless Seahorse::Util.host_label?(
|
@@ -60,7 +60,7 @@ module Aws
|
|
60
60
|
if custom_endpoint
|
61
61
|
"#{pfx}.#{custom_endpoint}"
|
62
62
|
else
|
63
|
-
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region)
|
63
|
+
sfx = Aws::Partitions::EndpointProvider.dns_suffix_for(region, 's3')
|
64
64
|
"#{pfx}.s3-object-lambda#{'-fips' if fips}.#{region}.#{sfx}"
|
65
65
|
end
|
66
66
|
end
|
@@ -20,13 +20,14 @@ module Aws
|
|
20
20
|
|
21
21
|
def validate_arn!
|
22
22
|
unless @service == 's3-outposts'
|
23
|
-
raise ArgumentError, 'Must provide a valid S3
|
23
|
+
raise ArgumentError, 'Must provide a valid S3 Outpost Access '\
|
24
|
+
'Point ARN.'
|
24
25
|
end
|
25
26
|
|
26
27
|
if @region.empty? || @account_id.empty?
|
27
28
|
raise ArgumentError,
|
28
|
-
'S3 Outpost ARNs must contain both a region '\
|
29
|
-
'and an account
|
29
|
+
'S3 Outpost Access Point ARNs must contain both a region '\
|
30
|
+
'and an account ID.'
|
30
31
|
end
|
31
32
|
|
32
33
|
if @type != 'outpost' && @subtype != 'accesspoint'
|
@@ -34,16 +35,16 @@ module Aws
|
|
34
35
|
end
|
35
36
|
|
36
37
|
if @outpost_id.nil? || @outpost_id.empty?
|
37
|
-
raise ArgumentError, 'Missing ARN
|
38
|
+
raise ArgumentError, 'Missing ARN Outpost ID.'
|
38
39
|
end
|
39
40
|
|
40
41
|
if @access_point_name.nil? || @access_point_name.empty?
|
41
|
-
raise ArgumentError, 'Missing ARN
|
42
|
+
raise ArgumentError, 'Missing ARN Access Point name.'
|
42
43
|
end
|
43
44
|
|
44
45
|
if @extra
|
45
46
|
raise ArgumentError,
|
46
|
-
'ARN
|
47
|
+
'ARN Access Point resource must be a single value.'
|
47
48
|
end
|
48
49
|
|
49
50
|
unless Seahorse::Util.host_label?(
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -517,12 +517,12 @@ module Aws::S3
|
|
517
517
|
# If `x-amz-server-side-encryption` is present and has the value of
|
518
518
|
# `aws:kms`, this header specifies the ID of the Amazon Web Services Key
|
519
519
|
# Management Service (Amazon Web Services KMS) symmetrical customer
|
520
|
-
# managed
|
521
|
-
#
|
520
|
+
# managed key that was used for the object. If you specify
|
521
|
+
# `x-amz-server-side-encryption:aws:kms`, but do not provide`
|
522
522
|
# x-amz-server-side-encryption-aws-kms-key-id`, Amazon S3 uses the
|
523
|
-
# Amazon Web Services managed
|
524
|
-
#
|
525
|
-
#
|
523
|
+
# Amazon Web Services managed key to protect the data. If the KMS key
|
524
|
+
# does not exist in the same account issuing the command, you must use
|
525
|
+
# the full ARN and not just the ID.
|
526
526
|
# @option options [String] :ssekms_encryption_context
|
527
527
|
# Specifies the Amazon Web Services KMS Encryption Context to use for
|
528
528
|
# object encryption. The value of this header is a base64-encoded UTF-8
|