aws-sdk-s3 1.5.0 → 1.6.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-s3.rb +2 -1
- data/lib/aws-sdk-s3/bucket.rb +8 -0
- data/lib/aws-sdk-s3/bucket_lifecycle_configuration.rb +275 -0
- data/lib/aws-sdk-s3/bucket_policy.rb +4 -0
- data/lib/aws-sdk-s3/client.rb +132 -5
- data/lib/aws-sdk-s3/client_api.rb +100 -0
- data/lib/aws-sdk-s3/types.rb +439 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50975145ed743faddca2105ca3b4d0cb2120e009
|
4
|
+
data.tar.gz: b6d5f0ecf08b373095310135a7c9f82d4c65ed9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 407d5f65127fc81196f28dc9b2f228e2531898326aaa4ce0ebc23ccdc31a54db02fc38318fe75138679178013e8f00e11a4f6dee457ff7ab1721c491c06bc0a7
|
7
|
+
data.tar.gz: 1968c5f85deb5caadc4e6cea3bd31484375cc77e317bef8d50a1434ff4cfc6f0ca42247107b4f03bb4d09a01370bc265db5518eb5c53c0ca0796d5d54401b700
|
data/lib/aws-sdk-s3.rb
CHANGED
@@ -19,6 +19,7 @@ require_relative 'aws-sdk-s3/bucket'
|
|
19
19
|
require_relative 'aws-sdk-s3/bucket_acl'
|
20
20
|
require_relative 'aws-sdk-s3/bucket_cors'
|
21
21
|
require_relative 'aws-sdk-s3/bucket_lifecycle'
|
22
|
+
require_relative 'aws-sdk-s3/bucket_lifecycle_configuration'
|
22
23
|
require_relative 'aws-sdk-s3/bucket_logging'
|
23
24
|
require_relative 'aws-sdk-s3/bucket_notification'
|
24
25
|
require_relative 'aws-sdk-s3/bucket_policy'
|
@@ -61,6 +62,6 @@ require_relative 'aws-sdk-s3/customizations'
|
|
61
62
|
# @service
|
62
63
|
module Aws::S3
|
63
64
|
|
64
|
-
GEM_VERSION = '1.
|
65
|
+
GEM_VERSION = '1.6.0'
|
65
66
|
|
66
67
|
end
|
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -433,6 +433,14 @@ module Aws::S3
|
|
433
433
|
)
|
434
434
|
end
|
435
435
|
|
436
|
+
# @return [BucketLifecycleConfiguration]
|
437
|
+
def lifecycle_configuration
|
438
|
+
BucketLifecycleConfiguration.new(
|
439
|
+
bucket_name: @name,
|
440
|
+
client: @client
|
441
|
+
)
|
442
|
+
end
|
443
|
+
|
436
444
|
# @return [BucketLogging]
|
437
445
|
def logging
|
438
446
|
BucketLogging.new(
|
@@ -0,0 +1,275 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing guide for more information:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
module Aws::S3
|
9
|
+
class BucketLifecycleConfiguration
|
10
|
+
|
11
|
+
extend Aws::Deprecations
|
12
|
+
|
13
|
+
# @overload def initialize(bucket_name, options = {})
|
14
|
+
# @param [String] bucket_name
|
15
|
+
# @option options [Client] :client
|
16
|
+
# @overload def initialize(options = {})
|
17
|
+
# @option options [required, String] :bucket_name
|
18
|
+
# @option options [Client] :client
|
19
|
+
def initialize(*args)
|
20
|
+
options = Hash === args.last ? args.pop.dup : {}
|
21
|
+
@bucket_name = extract_bucket_name(args, options)
|
22
|
+
@data = options.delete(:data)
|
23
|
+
@client = options.delete(:client) || Client.new(options)
|
24
|
+
end
|
25
|
+
|
26
|
+
# @!group Read-Only Attributes
|
27
|
+
|
28
|
+
# @return [String]
|
29
|
+
def bucket_name
|
30
|
+
@bucket_name
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [Array<Types::LifecycleRule>]
|
34
|
+
def rules
|
35
|
+
data[:rules]
|
36
|
+
end
|
37
|
+
|
38
|
+
# @!endgroup
|
39
|
+
|
40
|
+
# @return [Client]
|
41
|
+
def client
|
42
|
+
@client
|
43
|
+
end
|
44
|
+
|
45
|
+
# Loads, or reloads {#data} for the current {BucketLifecycleConfiguration}.
|
46
|
+
# Returns `self` making it possible to chain methods.
|
47
|
+
#
|
48
|
+
# bucket_lifecycle_configuration.reload.data
|
49
|
+
#
|
50
|
+
# @return [self]
|
51
|
+
def load
|
52
|
+
resp = @client.get_bucket_lifecycle_configuration(bucket: @bucket_name)
|
53
|
+
@data = resp.data
|
54
|
+
self
|
55
|
+
end
|
56
|
+
alias :reload :load
|
57
|
+
|
58
|
+
# @return [Types::GetBucketLifecycleConfigurationOutput]
|
59
|
+
# Returns the data for this {BucketLifecycleConfiguration}. Calls
|
60
|
+
# {Client#get_bucket_lifecycle_configuration} if {#data_loaded?} is `false`.
|
61
|
+
def data
|
62
|
+
load unless @data
|
63
|
+
@data
|
64
|
+
end
|
65
|
+
|
66
|
+
# @return [Boolean]
|
67
|
+
# Returns `true` if this resource is loaded. Accessing attributes or
|
68
|
+
# {#data} on an unloaded resource will trigger a call to {#load}.
|
69
|
+
def data_loaded?
|
70
|
+
!!@data
|
71
|
+
end
|
72
|
+
|
73
|
+
# @deprecated Use [Aws::S3::Client] #wait_until instead
|
74
|
+
#
|
75
|
+
# Waiter polls an API operation until a resource enters a desired
|
76
|
+
# state.
|
77
|
+
#
|
78
|
+
# @note The waiting operation is performed on a copy. The original resource remains unchanged
|
79
|
+
#
|
80
|
+
# ## Basic Usage
|
81
|
+
#
|
82
|
+
# Waiter will polls until it is successful, it fails by
|
83
|
+
# entering a terminal state, or until a maximum number of attempts
|
84
|
+
# are made.
|
85
|
+
#
|
86
|
+
# # polls in a loop until condition is true
|
87
|
+
# resource.wait_until(options) {|resource| condition}
|
88
|
+
#
|
89
|
+
# ## Example
|
90
|
+
#
|
91
|
+
# instance.wait_until(max_attempts:10, delay:5) {|instance| instance.state.name == 'running' }
|
92
|
+
#
|
93
|
+
# ## Configuration
|
94
|
+
#
|
95
|
+
# You can configure the maximum number of polling attempts, and the
|
96
|
+
# delay (in seconds) between each polling attempt. The waiting condition is set
|
97
|
+
# by passing a block to {#wait_until}:
|
98
|
+
#
|
99
|
+
# # poll for ~25 seconds
|
100
|
+
# resource.wait_until(max_attempts:5,delay:5) {|resource|...}
|
101
|
+
#
|
102
|
+
# ## Callbacks
|
103
|
+
#
|
104
|
+
# You can be notified before each polling attempt and before each
|
105
|
+
# delay. If you throw `:success` or `:failure` from these callbacks,
|
106
|
+
# it will terminate the waiter.
|
107
|
+
#
|
108
|
+
# started_at = Time.now
|
109
|
+
# # poll for 1 hour, instead of a number of attempts
|
110
|
+
# proc = Proc.new do |attempts, response|
|
111
|
+
# throw :failure if Time.now - started_at > 3600
|
112
|
+
# end
|
113
|
+
#
|
114
|
+
# # disable max attempts
|
115
|
+
# instance.wait_until(before_wait:proc, max_attempts:nil) {...}
|
116
|
+
#
|
117
|
+
# ## Handling Errors
|
118
|
+
#
|
119
|
+
# When a waiter is successful, it returns the Resource. When a waiter
|
120
|
+
# fails, it raises an error.
|
121
|
+
#
|
122
|
+
# begin
|
123
|
+
# resource.wait_until(...)
|
124
|
+
# rescue Aws::Waiters::Errors::WaiterFailed
|
125
|
+
# # resource did not enter the desired state in time
|
126
|
+
# end
|
127
|
+
#
|
128
|
+
#
|
129
|
+
# @yield param [Resource] resource to be used in the waiting condition
|
130
|
+
#
|
131
|
+
# @raise [Aws::Waiters::Errors::FailureStateError] Raised when the waiter terminates
|
132
|
+
# because the waiter has entered a state that it will not transition
|
133
|
+
# out of, preventing success.
|
134
|
+
#
|
135
|
+
# yet successful.
|
136
|
+
#
|
137
|
+
# @raise [Aws::Waiters::Errors::UnexpectedError] Raised when an error is encountered
|
138
|
+
# while polling for a resource that is not expected.
|
139
|
+
#
|
140
|
+
# @raise [NotImplementedError] Raised when the resource does not
|
141
|
+
#
|
142
|
+
# @option options [Integer] :max_attempts (10) Maximum number of
|
143
|
+
# attempts
|
144
|
+
# @option options [Integer] :delay (10) Delay between each
|
145
|
+
# attempt in seconds
|
146
|
+
# @option options [Proc] :before_attempt (nil) Callback
|
147
|
+
# invoked before each attempt
|
148
|
+
# @option options [Proc] :before_wait (nil) Callback
|
149
|
+
# invoked before each wait
|
150
|
+
# @return [Resource] if the waiter was successful
|
151
|
+
def wait_until(options = {}, &block)
|
152
|
+
self_copy = self.dup
|
153
|
+
attempts = 0
|
154
|
+
options[:max_attempts] = 10 unless options.key?(:max_attempts)
|
155
|
+
options[:delay] ||= 10
|
156
|
+
options[:poller] = Proc.new do
|
157
|
+
attempts += 1
|
158
|
+
if block.call(self_copy)
|
159
|
+
[:success, self_copy]
|
160
|
+
else
|
161
|
+
self_copy.reload unless attempts == options[:max_attempts]
|
162
|
+
:retry
|
163
|
+
end
|
164
|
+
end
|
165
|
+
Aws::Waiters::Waiter.new(options).wait({})
|
166
|
+
end
|
167
|
+
|
168
|
+
# @!group Actions
|
169
|
+
|
170
|
+
# @example Request syntax with placeholder values
|
171
|
+
#
|
172
|
+
# bucket_lifecycle_configuration.delete()
|
173
|
+
# @param [Hash] options ({})
|
174
|
+
# @return [EmptyStructure]
|
175
|
+
def delete(options = {})
|
176
|
+
options = options.merge(bucket: @bucket_name)
|
177
|
+
resp = @client.delete_bucket_lifecycle(options)
|
178
|
+
resp.data
|
179
|
+
end
|
180
|
+
|
181
|
+
# @example Request syntax with placeholder values
|
182
|
+
#
|
183
|
+
# bucket_lifecycle_configuration.put({
|
184
|
+
# lifecycle_configuration: {
|
185
|
+
# rules: [ # required
|
186
|
+
# {
|
187
|
+
# expiration: {
|
188
|
+
# date: Time.now,
|
189
|
+
# days: 1,
|
190
|
+
# expired_object_delete_marker: false,
|
191
|
+
# },
|
192
|
+
# id: "ID",
|
193
|
+
# prefix: "Prefix",
|
194
|
+
# filter: {
|
195
|
+
# prefix: "Prefix",
|
196
|
+
# tag: {
|
197
|
+
# key: "ObjectKey", # required
|
198
|
+
# value: "Value", # required
|
199
|
+
# },
|
200
|
+
# and: {
|
201
|
+
# prefix: "Prefix",
|
202
|
+
# tags: [
|
203
|
+
# {
|
204
|
+
# key: "ObjectKey", # required
|
205
|
+
# value: "Value", # required
|
206
|
+
# },
|
207
|
+
# ],
|
208
|
+
# },
|
209
|
+
# },
|
210
|
+
# status: "Enabled", # required, accepts Enabled, Disabled
|
211
|
+
# transitions: [
|
212
|
+
# {
|
213
|
+
# date: Time.now,
|
214
|
+
# days: 1,
|
215
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA
|
216
|
+
# },
|
217
|
+
# ],
|
218
|
+
# noncurrent_version_transitions: [
|
219
|
+
# {
|
220
|
+
# noncurrent_days: 1,
|
221
|
+
# storage_class: "GLACIER", # accepts GLACIER, STANDARD_IA
|
222
|
+
# },
|
223
|
+
# ],
|
224
|
+
# noncurrent_version_expiration: {
|
225
|
+
# noncurrent_days: 1,
|
226
|
+
# },
|
227
|
+
# abort_incomplete_multipart_upload: {
|
228
|
+
# days_after_initiation: 1,
|
229
|
+
# },
|
230
|
+
# },
|
231
|
+
# ],
|
232
|
+
# },
|
233
|
+
# })
|
234
|
+
# @param [Hash] options ({})
|
235
|
+
# @option options [Types::BucketLifecycleConfiguration] :lifecycle_configuration
|
236
|
+
# @return [EmptyStructure]
|
237
|
+
def put(options = {})
|
238
|
+
options = options.merge(bucket: @bucket_name)
|
239
|
+
resp = @client.put_bucket_lifecycle_configuration(options)
|
240
|
+
resp.data
|
241
|
+
end
|
242
|
+
|
243
|
+
# @!group Associations
|
244
|
+
|
245
|
+
# @return [Bucket]
|
246
|
+
def bucket
|
247
|
+
Bucket.new(
|
248
|
+
name: @bucket_name,
|
249
|
+
client: @client
|
250
|
+
)
|
251
|
+
end
|
252
|
+
|
253
|
+
# @deprecated
|
254
|
+
# @api private
|
255
|
+
def identifiers
|
256
|
+
{ bucket_name: @bucket_name }
|
257
|
+
end
|
258
|
+
deprecated(:identifiers)
|
259
|
+
|
260
|
+
private
|
261
|
+
|
262
|
+
def extract_bucket_name(args, options)
|
263
|
+
value = args[0] || options.delete(:bucket_name)
|
264
|
+
case value
|
265
|
+
when String then value
|
266
|
+
when nil then raise ArgumentError, "missing required option :bucket_name"
|
267
|
+
else
|
268
|
+
msg = "expected :bucket_name to be a String, got #{value.class}"
|
269
|
+
raise ArgumentError, msg
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
class Collection < Aws::Resources::Collection; end
|
274
|
+
end
|
275
|
+
end
|
@@ -183,10 +183,14 @@ module Aws::S3
|
|
183
183
|
#
|
184
184
|
# bucket_policy.put({
|
185
185
|
# content_md5: "ContentMD5",
|
186
|
+
# confirm_remove_self_bucket_access: false,
|
186
187
|
# policy: "Policy", # required
|
187
188
|
# })
|
188
189
|
# @param [Hash] options ({})
|
189
190
|
# @option options [String] :content_md5
|
191
|
+
# @option options [Boolean] :confirm_remove_self_bucket_access
|
192
|
+
# Set this parameter to true to confirm that you want to remove your
|
193
|
+
# permissions to change this bucket policy in the future.
|
190
194
|
# @option options [required, String] :policy
|
191
195
|
# The bucket policy as a JSON document.
|
192
196
|
# @return [EmptyStructure]
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -939,6 +939,29 @@ module Aws::S3
|
|
939
939
|
req.send_request(options)
|
940
940
|
end
|
941
941
|
|
942
|
+
# Deletes the server-side encryption configuration from the bucket.
|
943
|
+
#
|
944
|
+
# @option params [required, String] :bucket
|
945
|
+
# The name of the bucket containing the server-side encryption
|
946
|
+
# configuration to delete.
|
947
|
+
#
|
948
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
949
|
+
#
|
950
|
+
# @example Request syntax with placeholder values
|
951
|
+
#
|
952
|
+
# resp = client.delete_bucket_encryption({
|
953
|
+
# bucket: "BucketName", # required
|
954
|
+
# })
|
955
|
+
#
|
956
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption AWS API Documentation
|
957
|
+
#
|
958
|
+
# @overload delete_bucket_encryption(params = {})
|
959
|
+
# @param [Hash] params ({})
|
960
|
+
def delete_bucket_encryption(params = {}, options = {})
|
961
|
+
req = build_request(:delete_bucket_encryption, params)
|
962
|
+
req.send_request(options)
|
963
|
+
end
|
964
|
+
|
942
965
|
# Deletes an inventory configuration (identified by the inventory ID)
|
943
966
|
# from the bucket.
|
944
967
|
#
|
@@ -1597,6 +1620,37 @@ module Aws::S3
|
|
1597
1620
|
req.send_request(options)
|
1598
1621
|
end
|
1599
1622
|
|
1623
|
+
# Returns the server-side encryption configuration of a bucket.
|
1624
|
+
#
|
1625
|
+
# @option params [required, String] :bucket
|
1626
|
+
# The name of the bucket from which the server-side encryption
|
1627
|
+
# configuration is retrieved.
|
1628
|
+
#
|
1629
|
+
# @return [Types::GetBucketEncryptionOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
1630
|
+
#
|
1631
|
+
# * {Types::GetBucketEncryptionOutput#server_side_encryption_configuration #server_side_encryption_configuration} => Types::ServerSideEncryptionConfiguration
|
1632
|
+
#
|
1633
|
+
# @example Request syntax with placeholder values
|
1634
|
+
#
|
1635
|
+
# resp = client.get_bucket_encryption({
|
1636
|
+
# bucket: "BucketName", # required
|
1637
|
+
# })
|
1638
|
+
#
|
1639
|
+
# @example Response structure
|
1640
|
+
#
|
1641
|
+
# resp.server_side_encryption_configuration.rules #=> Array
|
1642
|
+
# resp.server_side_encryption_configuration.rules[0].apply_server_side_encryption_by_default.sse_algorithm #=> String, one of "AES256", "aws:kms"
|
1643
|
+
# resp.server_side_encryption_configuration.rules[0].apply_server_side_encryption_by_default.kms_master_key_id #=> String
|
1644
|
+
#
|
1645
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption AWS API Documentation
|
1646
|
+
#
|
1647
|
+
# @overload get_bucket_encryption(params = {})
|
1648
|
+
# @param [Hash] params ({})
|
1649
|
+
def get_bucket_encryption(params = {}, options = {})
|
1650
|
+
req = build_request(:get_bucket_encryption, params)
|
1651
|
+
req.send_request(options)
|
1652
|
+
end
|
1653
|
+
|
1600
1654
|
# Returns an inventory configuration (identified by the inventory ID)
|
1601
1655
|
# from the bucket.
|
1602
1656
|
#
|
@@ -1624,12 +1678,13 @@ module Aws::S3
|
|
1624
1678
|
# resp.inventory_configuration.destination.s3_bucket_destination.bucket #=> String
|
1625
1679
|
# resp.inventory_configuration.destination.s3_bucket_destination.format #=> String, one of "CSV"
|
1626
1680
|
# resp.inventory_configuration.destination.s3_bucket_destination.prefix #=> String
|
1681
|
+
# resp.inventory_configuration.destination.s3_bucket_destination.encryption.ssekms.key_id #=> String
|
1627
1682
|
# resp.inventory_configuration.is_enabled #=> Boolean
|
1628
1683
|
# resp.inventory_configuration.filter.prefix #=> String
|
1629
1684
|
# resp.inventory_configuration.id #=> String
|
1630
1685
|
# resp.inventory_configuration.included_object_versions #=> String, one of "All", "Current"
|
1631
1686
|
# resp.inventory_configuration.optional_fields #=> Array
|
1632
|
-
# resp.inventory_configuration.optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus"
|
1687
|
+
# resp.inventory_configuration.optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus"
|
1633
1688
|
# resp.inventory_configuration.schedule.frequency #=> String, one of "Daily", "Weekly"
|
1634
1689
|
#
|
1635
1690
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration AWS API Documentation
|
@@ -2141,8 +2196,12 @@ module Aws::S3
|
|
2141
2196
|
# resp.replication_configuration.rules[0].id #=> String
|
2142
2197
|
# resp.replication_configuration.rules[0].prefix #=> String
|
2143
2198
|
# resp.replication_configuration.rules[0].status #=> String, one of "Enabled", "Disabled"
|
2199
|
+
# resp.replication_configuration.rules[0].source_selection_criteria.sse_kms_encrypted_objects.status #=> String, one of "Enabled", "Disabled"
|
2144
2200
|
# resp.replication_configuration.rules[0].destination.bucket #=> String
|
2201
|
+
# resp.replication_configuration.rules[0].destination.account #=> String
|
2145
2202
|
# resp.replication_configuration.rules[0].destination.storage_class #=> String, one of "STANDARD", "REDUCED_REDUNDANCY", "STANDARD_IA"
|
2203
|
+
# resp.replication_configuration.rules[0].destination.access_control_translation.owner #=> String, one of "Destination"
|
2204
|
+
# resp.replication_configuration.rules[0].destination.encryption_configuration.replica_kms_key_id #=> String
|
2146
2205
|
#
|
2147
2206
|
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication AWS API Documentation
|
2148
2207
|
#
|
@@ -3135,12 +3194,13 @@ module Aws::S3
|
|
3135
3194
|
# resp.inventory_configuration_list[0].destination.s3_bucket_destination.bucket #=> String
|
3136
3195
|
# resp.inventory_configuration_list[0].destination.s3_bucket_destination.format #=> String, one of "CSV"
|
3137
3196
|
# resp.inventory_configuration_list[0].destination.s3_bucket_destination.prefix #=> String
|
3197
|
+
# resp.inventory_configuration_list[0].destination.s3_bucket_destination.encryption.ssekms.key_id #=> String
|
3138
3198
|
# resp.inventory_configuration_list[0].is_enabled #=> Boolean
|
3139
3199
|
# resp.inventory_configuration_list[0].filter.prefix #=> String
|
3140
3200
|
# resp.inventory_configuration_list[0].id #=> String
|
3141
3201
|
# resp.inventory_configuration_list[0].included_object_versions #=> String, one of "All", "Current"
|
3142
3202
|
# resp.inventory_configuration_list[0].optional_fields #=> Array
|
3143
|
-
# resp.inventory_configuration_list[0].optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus"
|
3203
|
+
# resp.inventory_configuration_list[0].optional_fields[0] #=> String, one of "Size", "LastModifiedDate", "StorageClass", "ETag", "IsMultipartUploaded", "ReplicationStatus", "EncryptionStatus"
|
3144
3204
|
# resp.inventory_configuration_list[0].schedule.frequency #=> String, one of "Daily", "Weekly"
|
3145
3205
|
# resp.is_truncated #=> Boolean
|
3146
3206
|
# resp.next_continuation_token #=> String
|
@@ -4234,6 +4294,49 @@ module Aws::S3
|
|
4234
4294
|
req.send_request(options)
|
4235
4295
|
end
|
4236
4296
|
|
4297
|
+
# Creates a new server-side encryption configuration (or replaces an
|
4298
|
+
# existing one, if present).
|
4299
|
+
#
|
4300
|
+
# @option params [required, String] :bucket
|
4301
|
+
# The name of the bucket for which the server-side encryption
|
4302
|
+
# configuration is set.
|
4303
|
+
#
|
4304
|
+
# @option params [String] :content_md5
|
4305
|
+
# The base64-encoded 128-bit MD5 digest of the server-side encryption
|
4306
|
+
# configuration.
|
4307
|
+
#
|
4308
|
+
# @option params [required, Types::ServerSideEncryptionConfiguration] :server_side_encryption_configuration
|
4309
|
+
# Container for server-side encryption configuration rules. Currently S3
|
4310
|
+
# supports one rule only.
|
4311
|
+
#
|
4312
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
4313
|
+
#
|
4314
|
+
# @example Request syntax with placeholder values
|
4315
|
+
#
|
4316
|
+
# resp = client.put_bucket_encryption({
|
4317
|
+
# bucket: "BucketName", # required
|
4318
|
+
# content_md5: "ContentMD5",
|
4319
|
+
# server_side_encryption_configuration: { # required
|
4320
|
+
# rules: [ # required
|
4321
|
+
# {
|
4322
|
+
# apply_server_side_encryption_by_default: {
|
4323
|
+
# sse_algorithm: "AES256", # required, accepts AES256, aws:kms
|
4324
|
+
# kms_master_key_id: "SSEKMSKeyId",
|
4325
|
+
# },
|
4326
|
+
# },
|
4327
|
+
# ],
|
4328
|
+
# },
|
4329
|
+
# })
|
4330
|
+
#
|
4331
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption AWS API Documentation
|
4332
|
+
#
|
4333
|
+
# @overload put_bucket_encryption(params = {})
|
4334
|
+
# @param [Hash] params ({})
|
4335
|
+
def put_bucket_encryption(params = {}, options = {})
|
4336
|
+
req = build_request(:put_bucket_encryption, params)
|
4337
|
+
req.send_request(options)
|
4338
|
+
end
|
4339
|
+
|
4237
4340
|
# Adds an inventory configuration (identified by the inventory ID) from
|
4238
4341
|
# the bucket.
|
4239
4342
|
#
|
@@ -4261,6 +4364,13 @@ module Aws::S3
|
|
4261
4364
|
# bucket: "BucketName", # required
|
4262
4365
|
# format: "CSV", # required, accepts CSV
|
4263
4366
|
# prefix: "Prefix",
|
4367
|
+
# encryption: {
|
4368
|
+
# sses3: {
|
4369
|
+
# },
|
4370
|
+
# ssekms: {
|
4371
|
+
# key_id: "SSEKMSKeyId", # required
|
4372
|
+
# },
|
4373
|
+
# },
|
4264
4374
|
# },
|
4265
4375
|
# },
|
4266
4376
|
# is_enabled: false, # required
|
@@ -4269,7 +4379,7 @@ module Aws::S3
|
|
4269
4379
|
# },
|
4270
4380
|
# id: "InventoryId", # required
|
4271
4381
|
# included_object_versions: "All", # required, accepts All, Current
|
4272
|
-
# optional_fields: ["Size"], # accepts Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus
|
4382
|
+
# optional_fields: ["Size"], # accepts Size, LastModifiedDate, StorageClass, ETag, IsMultipartUploaded, ReplicationStatus, EncryptionStatus
|
4273
4383
|
# schedule: { # required
|
4274
4384
|
# frequency: "Daily", # required, accepts Daily, Weekly
|
4275
4385
|
# },
|
@@ -4713,6 +4823,10 @@ module Aws::S3
|
|
4713
4823
|
#
|
4714
4824
|
# @option params [String] :content_md5
|
4715
4825
|
#
|
4826
|
+
# @option params [Boolean] :confirm_remove_self_bucket_access
|
4827
|
+
# Set this parameter to true to confirm that you want to remove your
|
4828
|
+
# permissions to change this bucket policy in the future.
|
4829
|
+
#
|
4716
4830
|
# @option params [required, String] :policy
|
4717
4831
|
# The bucket policy as a JSON document.
|
4718
4832
|
#
|
@@ -4733,6 +4847,7 @@ module Aws::S3
|
|
4733
4847
|
# resp = client.put_bucket_policy({
|
4734
4848
|
# bucket: "BucketName", # required
|
4735
4849
|
# content_md5: "ContentMD5",
|
4850
|
+
# confirm_remove_self_bucket_access: false,
|
4736
4851
|
# policy: "Policy", # required
|
4737
4852
|
# })
|
4738
4853
|
#
|
@@ -4792,9 +4907,21 @@ module Aws::S3
|
|
4792
4907
|
# id: "ID",
|
4793
4908
|
# prefix: "Prefix", # required
|
4794
4909
|
# status: "Enabled", # required, accepts Enabled, Disabled
|
4910
|
+
# source_selection_criteria: {
|
4911
|
+
# sse_kms_encrypted_objects: {
|
4912
|
+
# status: "Enabled", # required, accepts Enabled, Disabled
|
4913
|
+
# },
|
4914
|
+
# },
|
4795
4915
|
# destination: { # required
|
4796
4916
|
# bucket: "BucketName", # required
|
4917
|
+
# account: "AccountId",
|
4797
4918
|
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA
|
4919
|
+
# access_control_translation: {
|
4920
|
+
# owner: "Destination", # required, accepts Destination
|
4921
|
+
# },
|
4922
|
+
# encryption_configuration: {
|
4923
|
+
# replica_kms_key_id: "ReplicaKmsKeyID",
|
4924
|
+
# },
|
4798
4925
|
# },
|
4799
4926
|
# },
|
4800
4927
|
# ],
|
@@ -5823,7 +5950,7 @@ module Aws::S3
|
|
5823
5950
|
#
|
5824
5951
|
# resp = client.upload_part_copy({
|
5825
5952
|
# bucket: "examplebucket",
|
5826
|
-
# copy_source: "bucketname/sourceobjectkey",
|
5953
|
+
# copy_source: "/bucketname/sourceobjectkey",
|
5827
5954
|
# key: "examplelargeobject",
|
5828
5955
|
# part_number: 1,
|
5829
5956
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
@@ -5892,7 +6019,7 @@ module Aws::S3
|
|
5892
6019
|
params: params,
|
5893
6020
|
config: config)
|
5894
6021
|
context[:gem_name] = 'aws-sdk-s3'
|
5895
|
-
context[:gem_version] = '1.
|
6022
|
+
context[:gem_version] = '1.6.0'
|
5896
6023
|
Seahorse::Client::Request.new(handlers, context)
|
5897
6024
|
end
|
5898
6025
|
|