aws-sdk-s3 1.96.2 → 1.132.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +256 -0
  3. data/VERSION +1 -1
  4. data/lib/aws-sdk-s3/bucket.rb +226 -76
  5. data/lib/aws-sdk-s3/bucket_acl.rb +30 -7
  6. data/lib/aws-sdk-s3/bucket_cors.rb +35 -10
  7. data/lib/aws-sdk-s3/bucket_lifecycle.rb +39 -12
  8. data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +40 -10
  9. data/lib/aws-sdk-s3/bucket_logging.rb +30 -7
  10. data/lib/aws-sdk-s3/bucket_notification.rb +28 -10
  11. data/lib/aws-sdk-s3/bucket_policy.rb +35 -10
  12. data/lib/aws-sdk-s3/bucket_request_payment.rb +30 -7
  13. data/lib/aws-sdk-s3/bucket_tagging.rb +35 -10
  14. data/lib/aws-sdk-s3/bucket_versioning.rb +78 -17
  15. data/lib/aws-sdk-s3/bucket_website.rb +35 -10
  16. data/lib/aws-sdk-s3/client.rb +3854 -2120
  17. data/lib/aws-sdk-s3/client_api.rb +601 -208
  18. data/lib/aws-sdk-s3/customizations/bucket.rb +23 -47
  19. data/lib/aws-sdk-s3/customizations/errors.rb +27 -0
  20. data/lib/aws-sdk-s3/customizations/object.rb +130 -24
  21. data/lib/aws-sdk-s3/customizations/types/permanent_redirect.rb +26 -0
  22. data/lib/aws-sdk-s3/customizations.rb +2 -0
  23. data/lib/aws-sdk-s3/encryption/client.rb +7 -3
  24. data/lib/aws-sdk-s3/encryption/decrypt_handler.rb +0 -4
  25. data/lib/aws-sdk-s3/encryption/kms_cipher_provider.rb +13 -9
  26. data/lib/aws-sdk-s3/encryptionV2/client.rb +7 -3
  27. data/lib/aws-sdk-s3/encryptionV2/decrypt_handler.rb +1 -4
  28. data/lib/aws-sdk-s3/encryptionV2/encrypt_handler.rb +0 -4
  29. data/lib/aws-sdk-s3/encryptionV2/kms_cipher_provider.rb +10 -6
  30. data/lib/aws-sdk-s3/endpoint_parameters.rb +146 -0
  31. data/lib/aws-sdk-s3/endpoint_provider.rb +509 -0
  32. data/lib/aws-sdk-s3/endpoints.rb +2150 -0
  33. data/lib/aws-sdk-s3/file_downloader.rb +57 -27
  34. data/lib/aws-sdk-s3/file_uploader.rb +12 -5
  35. data/lib/aws-sdk-s3/multipart_file_uploader.rb +26 -7
  36. data/lib/aws-sdk-s3/multipart_stream_uploader.rb +41 -13
  37. data/lib/aws-sdk-s3/multipart_upload.rb +138 -16
  38. data/lib/aws-sdk-s3/multipart_upload_part.rb +144 -18
  39. data/lib/aws-sdk-s3/object.rb +364 -160
  40. data/lib/aws-sdk-s3/object_acl.rb +32 -9
  41. data/lib/aws-sdk-s3/object_copier.rb +7 -5
  42. data/lib/aws-sdk-s3/object_multipart_copier.rb +41 -19
  43. data/lib/aws-sdk-s3/object_summary.rb +291 -123
  44. data/lib/aws-sdk-s3/object_version.rb +99 -46
  45. data/lib/aws-sdk-s3/plugins/accelerate.rb +3 -44
  46. data/lib/aws-sdk-s3/plugins/arn.rb +22 -180
  47. data/lib/aws-sdk-s3/plugins/bucket_dns.rb +3 -39
  48. data/lib/aws-sdk-s3/plugins/bucket_name_restrictions.rb +1 -6
  49. data/lib/aws-sdk-s3/plugins/dualstack.rb +1 -55
  50. data/lib/aws-sdk-s3/plugins/endpoints.rb +262 -0
  51. data/lib/aws-sdk-s3/plugins/expect_100_continue.rb +2 -1
  52. data/lib/aws-sdk-s3/plugins/iad_regional_endpoint.rb +6 -29
  53. data/lib/aws-sdk-s3/plugins/md5s.rb +5 -3
  54. data/lib/aws-sdk-s3/plugins/s3_signer.rb +35 -100
  55. data/lib/aws-sdk-s3/plugins/skip_whole_multipart_get_checksums.rb +31 -0
  56. data/lib/aws-sdk-s3/plugins/streaming_retry.rb +23 -2
  57. data/lib/aws-sdk-s3/presigned_post.rb +99 -78
  58. data/lib/aws-sdk-s3/presigner.rb +24 -29
  59. data/lib/aws-sdk-s3/resource.rb +25 -3
  60. data/lib/aws-sdk-s3/types.rb +3307 -4625
  61. data/lib/aws-sdk-s3.rb +5 -1
  62. metadata +14 -11
  63. data/lib/aws-sdk-s3/arn/access_point_arn.rb +0 -69
  64. data/lib/aws-sdk-s3/arn/object_lambda_arn.rb +0 -69
  65. data/lib/aws-sdk-s3/arn/outpost_access_point_arn.rb +0 -73
  66. data/lib/aws-sdk-s3/plugins/object_lambda_endpoint.rb +0 -25
@@ -0,0 +1,146 @@
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
+ module Aws::S3
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute bucket
14
+ # The S3 bucket used to send the request. This is an optional parameter that will be set automatically for operations that are scoped to an S3 bucket.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute region
19
+ # The AWS region used to dispatch the request.
20
+ #
21
+ # @return [String]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute use_dual_stack
29
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
30
+ #
31
+ # @return [Boolean]
32
+ #
33
+ # @!attribute endpoint
34
+ # Override the endpoint used to send this request
35
+ #
36
+ # @return [String]
37
+ #
38
+ # @!attribute force_path_style
39
+ # When true, force a path-style endpoint to be used where the bucket name is part of the path.
40
+ #
41
+ # @return [Boolean]
42
+ #
43
+ # @!attribute accelerate
44
+ # When true, use S3 Accelerate. NOTE: Not all regions support S3 accelerate.
45
+ #
46
+ # @return [Boolean]
47
+ #
48
+ # @!attribute use_global_endpoint
49
+ # Whether the global endpoint should be used, rather then the regional endpoint for us-east-1.
50
+ #
51
+ # @return [Boolean]
52
+ #
53
+ # @!attribute use_object_lambda_endpoint
54
+ # Internal parameter to use object lambda endpoint for an operation (eg: WriteGetObjectResponse)
55
+ #
56
+ # @return [Boolean]
57
+ #
58
+ # @!attribute disable_access_points
59
+ # Internal parameter to disable Access Point Buckets
60
+ #
61
+ # @return [Boolean]
62
+ #
63
+ # @!attribute disable_multi_region_access_points
64
+ # Whether multi-region access points (MRAP) should be disabled.
65
+ #
66
+ # @return [Boolean]
67
+ #
68
+ # @!attribute use_arn_region
69
+ # When an Access Point ARN is provided and this flag is enabled, the SDK MUST use the ARN's region when constructing the endpoint instead of the client's configured region.
70
+ #
71
+ # @return [Boolean]
72
+ #
73
+ EndpointParameters = Struct.new(
74
+ :bucket,
75
+ :region,
76
+ :use_fips,
77
+ :use_dual_stack,
78
+ :endpoint,
79
+ :force_path_style,
80
+ :accelerate,
81
+ :use_global_endpoint,
82
+ :use_object_lambda_endpoint,
83
+ :disable_access_points,
84
+ :disable_multi_region_access_points,
85
+ :use_arn_region,
86
+ ) do
87
+ include Aws::Structure
88
+
89
+ # @api private
90
+ class << self
91
+ PARAM_MAP = {
92
+ 'Bucket' => :bucket,
93
+ 'Region' => :region,
94
+ 'UseFIPS' => :use_fips,
95
+ 'UseDualStack' => :use_dual_stack,
96
+ 'Endpoint' => :endpoint,
97
+ 'ForcePathStyle' => :force_path_style,
98
+ 'Accelerate' => :accelerate,
99
+ 'UseGlobalEndpoint' => :use_global_endpoint,
100
+ 'UseObjectLambdaEndpoint' => :use_object_lambda_endpoint,
101
+ 'DisableAccessPoints' => :disable_access_points,
102
+ 'DisableMultiRegionAccessPoints' => :disable_multi_region_access_points,
103
+ 'UseArnRegion' => :use_arn_region,
104
+ }.freeze
105
+ end
106
+
107
+ def initialize(options = {})
108
+ self[:bucket] = options[:bucket]
109
+ self[:region] = options[:region]
110
+ self[:use_fips] = options[:use_fips]
111
+ self[:use_fips] = false if self[:use_fips].nil?
112
+ if self[:use_fips].nil?
113
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
114
+ end
115
+ self[:use_dual_stack] = options[:use_dual_stack]
116
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
117
+ if self[:use_dual_stack].nil?
118
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
119
+ end
120
+ self[:endpoint] = options[:endpoint]
121
+ self[:force_path_style] = options[:force_path_style]
122
+ self[:force_path_style] = false if self[:force_path_style].nil?
123
+ if self[:force_path_style].nil?
124
+ raise ArgumentError, "Missing required EndpointParameter: :force_path_style"
125
+ end
126
+ self[:accelerate] = options[:accelerate]
127
+ self[:accelerate] = false if self[:accelerate].nil?
128
+ if self[:accelerate].nil?
129
+ raise ArgumentError, "Missing required EndpointParameter: :accelerate"
130
+ end
131
+ self[:use_global_endpoint] = options[:use_global_endpoint]
132
+ self[:use_global_endpoint] = false if self[:use_global_endpoint].nil?
133
+ if self[:use_global_endpoint].nil?
134
+ raise ArgumentError, "Missing required EndpointParameter: :use_global_endpoint"
135
+ end
136
+ self[:use_object_lambda_endpoint] = options[:use_object_lambda_endpoint]
137
+ self[:disable_access_points] = options[:disable_access_points]
138
+ self[:disable_multi_region_access_points] = options[:disable_multi_region_access_points]
139
+ self[:disable_multi_region_access_points] = false if self[:disable_multi_region_access_points].nil?
140
+ if self[:disable_multi_region_access_points].nil?
141
+ raise ArgumentError, "Missing required EndpointParameter: :disable_multi_region_access_points"
142
+ end
143
+ self[:use_arn_region] = options[:use_arn_region]
144
+ end
145
+ end
146
+ end