aws-sdk-s3 1.23.1 → 1.24.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 +1 -1
- data/lib/aws-sdk-s3/bucket.rb +1 -1
- data/lib/aws-sdk-s3/bucket_notification.rb +3 -2
- data/lib/aws-sdk-s3/client.rb +252 -102
- data/lib/aws-sdk-s3/client_api.rb +77 -0
- data/lib/aws-sdk-s3/multipart_upload_part.rb +1 -1
- data/lib/aws-sdk-s3/object.rb +1 -1
- data/lib/aws-sdk-s3/object_summary.rb +1 -1
- data/lib/aws-sdk-s3/types.rb +419 -175
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97d1938cf5a4faa464529ea716f880937fa01890
|
4
|
+
data.tar.gz: 654d7b363813e905c20c4e3cf6c44d85cf6666e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6ea396990b609d2b334d75aa42e894eac9657b01f4d8a0f880b71858674aebf981470ec4ad018378df38acfb51f1ebd26fc93df79d1ede4fcaec9b2d6e1b6f0
|
7
|
+
data.tar.gz: a6e5e9f10c3879b499815419352bfd1d5f21867b8a09bf8994dd88d388692a1c2036292aaab22b8e08b0229e7be5bbb6381f9de1d314ff93168bc1f1f7dcf962
|
data/lib/aws-sdk-s3.rb
CHANGED
data/lib/aws-sdk-s3/bucket.rb
CHANGED
@@ -395,7 +395,7 @@ module Aws::S3
|
|
395
395
|
# http://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html
|
396
396
|
# @option options [String] :tagging
|
397
397
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
398
|
-
# parameters
|
398
|
+
# parameters. (For example, "Key1=Value1")
|
399
399
|
# @return [Object]
|
400
400
|
def put_object(options = {})
|
401
401
|
options = options.merge(bucket: @name)
|
@@ -236,8 +236,9 @@ module Aws::S3
|
|
236
236
|
# })
|
237
237
|
# @param [Hash] options ({})
|
238
238
|
# @option options [required, Types::NotificationConfiguration] :notification_configuration
|
239
|
-
#
|
240
|
-
# If this element is empty, notifications are turned off
|
239
|
+
# A container for specifying the notification configuration of the
|
240
|
+
# bucket. If this element is empty, notifications are turned off for the
|
241
|
+
# bucket.
|
241
242
|
# @return [EmptyStructure]
|
242
243
|
def put(options = {})
|
243
244
|
options = options.merge(bucket: @bucket_name)
|
data/lib/aws-sdk-s3/client.rb
CHANGED
@@ -15,6 +15,7 @@ require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
|
15
15
|
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
16
|
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
17
|
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/endpoint_discovery.rb'
|
18
19
|
require 'aws-sdk-core/plugins/response_paging.rb'
|
19
20
|
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
21
|
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
@@ -59,6 +60,7 @@ module Aws::S3
|
|
59
60
|
add_plugin(Aws::Plugins::RetryErrors)
|
60
61
|
add_plugin(Aws::Plugins::GlobalConfiguration)
|
61
62
|
add_plugin(Aws::Plugins::RegionalEndpoint)
|
63
|
+
add_plugin(Aws::Plugins::EndpointDiscovery)
|
62
64
|
add_plugin(Aws::Plugins::ResponsePaging)
|
63
65
|
add_plugin(Aws::Plugins::StubResponses)
|
64
66
|
add_plugin(Aws::Plugins::IdempotencyToken)
|
@@ -126,6 +128,10 @@ module Aws::S3
|
|
126
128
|
#
|
127
129
|
# @option options [String] :access_key_id
|
128
130
|
#
|
131
|
+
# @option options [Boolean] :active_endpoint_cache (false)
|
132
|
+
# When set to `true`, a thread polling for endpoints will be running in
|
133
|
+
# the background every 60 secs (default). Defaults to `false`.
|
134
|
+
#
|
129
135
|
# @option options [Boolean] :client_side_monitoring (false)
|
130
136
|
# When `true`, client-side metrics will be collected for all API requests from
|
131
137
|
# this client.
|
@@ -157,6 +163,21 @@ module Aws::S3
|
|
157
163
|
# option. You should only configure an `:endpoint` when connecting
|
158
164
|
# to test endpoints. This should be avalid HTTP(S) URI.
|
159
165
|
#
|
166
|
+
# @option options [Integer] :endpoint_cache_max_entries (1000)
|
167
|
+
# Used for the maximum size limit of the LRU cache storing endpoints data
|
168
|
+
# for endpoint discovery enabled operations. Defaults to 1000.
|
169
|
+
#
|
170
|
+
# @option options [Integer] :endpoint_cache_max_threads (10)
|
171
|
+
# Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.
|
172
|
+
#
|
173
|
+
# @option options [Integer] :endpoint_cache_poll_interval (60)
|
174
|
+
# When :endpoint_discovery and :active_endpoint_cache is enabled,
|
175
|
+
# Use this option to config the time interval in seconds for making
|
176
|
+
# requests fetching endpoints information. Defaults to 60 sec.
|
177
|
+
#
|
178
|
+
# @option options [Boolean] :endpoint_discovery (false)
|
179
|
+
# When set to `true`, endpoint discovery will be enabled for operations when available. Defaults to `false`.
|
180
|
+
#
|
160
181
|
# @option options [Proc] :event_stream_handler
|
161
182
|
# When an EventStream or Proc object is provided, it will be used as callback for each chunk of event stream response received along the way.
|
162
183
|
#
|
@@ -947,7 +968,7 @@ module Aws::S3
|
|
947
968
|
req.send_request(options)
|
948
969
|
end
|
949
970
|
|
950
|
-
# Deletes the
|
971
|
+
# Deletes the CORS configuration information set for the bucket.
|
951
972
|
#
|
952
973
|
# @option params [required, String] :bucket
|
953
974
|
#
|
@@ -1115,21 +1136,19 @@ module Aws::S3
|
|
1115
1136
|
req.send_request(options)
|
1116
1137
|
end
|
1117
1138
|
|
1118
|
-
# Deletes the replication configuration from the bucket.
|
1139
|
+
# Deletes the replication configuration from the bucket. For information
|
1140
|
+
# about replication configuration, see [Cross-Region Replication (CRR)](
|
1141
|
+
# https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) in the
|
1142
|
+
# *Amazon S3 Developer Guide*.
|
1119
1143
|
#
|
1120
1144
|
# @option params [required, String] :bucket
|
1121
|
-
#
|
1122
|
-
# bucket.
|
1145
|
+
# The bucket name.
|
1123
1146
|
#
|
1124
|
-
# <note markdown="1">
|
1125
|
-
#
|
1147
|
+
# <note markdown="1"> It can take a while to propagate the deletion of a replication
|
1148
|
+
# configuration to all Amazon S3 systems.
|
1126
1149
|
#
|
1127
1150
|
# </note>
|
1128
1151
|
#
|
1129
|
-
# For more information, see [Cross-Region Replication (CRR)](
|
1130
|
-
# https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) in the
|
1131
|
-
# Amazon S3 Developer Guide.
|
1132
|
-
#
|
1133
1152
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1134
1153
|
#
|
1135
1154
|
#
|
@@ -1245,6 +1264,15 @@ module Aws::S3
|
|
1245
1264
|
# * {Types::DeleteObjectOutput#request_charged #request_charged} => String
|
1246
1265
|
#
|
1247
1266
|
#
|
1267
|
+
# @example Example: To delete an object (from a non-versioned bucket)
|
1268
|
+
#
|
1269
|
+
# # The following example deletes an object from a non-versioned bucket.
|
1270
|
+
#
|
1271
|
+
# resp = client.delete_object({
|
1272
|
+
# bucket: "ExampleBucket",
|
1273
|
+
# key: "HappyFace.jpg",
|
1274
|
+
# })
|
1275
|
+
#
|
1248
1276
|
# @example Example: To delete an object
|
1249
1277
|
#
|
1250
1278
|
# # The following example deletes an object from an S3 bucket.
|
@@ -1258,15 +1286,6 @@ module Aws::S3
|
|
1258
1286
|
# {
|
1259
1287
|
# }
|
1260
1288
|
#
|
1261
|
-
# @example Example: To delete an object (from a non-versioned bucket)
|
1262
|
-
#
|
1263
|
-
# # The following example deletes an object from a non-versioned bucket.
|
1264
|
-
#
|
1265
|
-
# resp = client.delete_object({
|
1266
|
-
# bucket: "ExampleBucket",
|
1267
|
-
# key: "HappyFace.jpg",
|
1268
|
-
# })
|
1269
|
-
#
|
1270
1289
|
# @example Request syntax with placeholder values
|
1271
1290
|
#
|
1272
1291
|
# resp = client.delete_object({
|
@@ -1383,22 +1402,20 @@ module Aws::S3
|
|
1383
1402
|
# * {Types::DeleteObjectsOutput#errors #errors} => Array<Types::Error>
|
1384
1403
|
#
|
1385
1404
|
#
|
1386
|
-
# @example Example: To delete multiple
|
1405
|
+
# @example Example: To delete multiple objects from a versioned bucket
|
1387
1406
|
#
|
1388
|
-
# # The following example deletes objects from a bucket. The
|
1389
|
-
# #
|
1407
|
+
# # The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the
|
1408
|
+
# # object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.
|
1390
1409
|
#
|
1391
1410
|
# resp = client.delete_objects({
|
1392
1411
|
# bucket: "examplebucket",
|
1393
1412
|
# delete: {
|
1394
1413
|
# objects: [
|
1395
1414
|
# {
|
1396
|
-
# key: "
|
1397
|
-
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
1415
|
+
# key: "objectkey1",
|
1398
1416
|
# },
|
1399
1417
|
# {
|
1400
|
-
# key: "
|
1401
|
-
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
1418
|
+
# key: "objectkey2",
|
1402
1419
|
# },
|
1403
1420
|
# ],
|
1404
1421
|
# quiet: false,
|
@@ -1409,30 +1426,34 @@ module Aws::S3
|
|
1409
1426
|
# {
|
1410
1427
|
# deleted: [
|
1411
1428
|
# {
|
1412
|
-
#
|
1413
|
-
#
|
1429
|
+
# delete_marker: true,
|
1430
|
+
# delete_marker_version_id: "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F",
|
1431
|
+
# key: "objectkey1",
|
1414
1432
|
# },
|
1415
1433
|
# {
|
1416
|
-
#
|
1417
|
-
#
|
1434
|
+
# delete_marker: true,
|
1435
|
+
# delete_marker_version_id: "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt",
|
1436
|
+
# key: "objectkey2",
|
1418
1437
|
# },
|
1419
1438
|
# ],
|
1420
1439
|
# }
|
1421
1440
|
#
|
1422
|
-
# @example Example: To delete multiple
|
1441
|
+
# @example Example: To delete multiple object versions from a versioned bucket
|
1423
1442
|
#
|
1424
|
-
# # The following example deletes objects from a bucket. The
|
1425
|
-
# #
|
1443
|
+
# # The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object
|
1444
|
+
# # versions and returns the key and versions of deleted objects in the response.
|
1426
1445
|
#
|
1427
1446
|
# resp = client.delete_objects({
|
1428
1447
|
# bucket: "examplebucket",
|
1429
1448
|
# delete: {
|
1430
1449
|
# objects: [
|
1431
1450
|
# {
|
1432
|
-
# key: "
|
1451
|
+
# key: "HappyFace.jpg",
|
1452
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
1433
1453
|
# },
|
1434
1454
|
# {
|
1435
|
-
# key: "
|
1455
|
+
# key: "HappyFace.jpg",
|
1456
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
1436
1457
|
# },
|
1437
1458
|
# ],
|
1438
1459
|
# quiet: false,
|
@@ -1443,14 +1464,12 @@ module Aws::S3
|
|
1443
1464
|
# {
|
1444
1465
|
# deleted: [
|
1445
1466
|
# {
|
1446
|
-
#
|
1447
|
-
#
|
1448
|
-
# key: "objectkey1",
|
1467
|
+
# key: "HappyFace.jpg",
|
1468
|
+
# version_id: "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd",
|
1449
1469
|
# },
|
1450
1470
|
# {
|
1451
|
-
#
|
1452
|
-
#
|
1453
|
-
# key: "objectkey2",
|
1471
|
+
# key: "HappyFace.jpg",
|
1472
|
+
# version_id: "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b",
|
1454
1473
|
# },
|
1455
1474
|
# ],
|
1456
1475
|
# }
|
@@ -1495,6 +1514,29 @@ module Aws::S3
|
|
1495
1514
|
req.send_request(options)
|
1496
1515
|
end
|
1497
1516
|
|
1517
|
+
# Removes the Public Access Block configuration for an Amazon S3 bucket.
|
1518
|
+
#
|
1519
|
+
# @option params [required, String] :bucket
|
1520
|
+
# The Amazon S3 bucket whose Public Access Block configuration you want
|
1521
|
+
# to delete.
|
1522
|
+
#
|
1523
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1524
|
+
#
|
1525
|
+
# @example Request syntax with placeholder values
|
1526
|
+
#
|
1527
|
+
# resp = client.delete_public_access_block({
|
1528
|
+
# bucket: "BucketName", # required
|
1529
|
+
# })
|
1530
|
+
#
|
1531
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock AWS API Documentation
|
1532
|
+
#
|
1533
|
+
# @overload delete_public_access_block(params = {})
|
1534
|
+
# @param [Hash] params ({})
|
1535
|
+
def delete_public_access_block(params = {}, options = {})
|
1536
|
+
req = build_request(:delete_public_access_block, params)
|
1537
|
+
req.send_request(options)
|
1538
|
+
end
|
1539
|
+
|
1498
1540
|
# Returns the accelerate configuration of a bucket.
|
1499
1541
|
#
|
1500
1542
|
# @option params [required, String] :bucket
|
@@ -1606,7 +1648,7 @@ module Aws::S3
|
|
1606
1648
|
req.send_request(options)
|
1607
1649
|
end
|
1608
1650
|
|
1609
|
-
# Returns the
|
1651
|
+
# Returns the CORS configuration for the bucket.
|
1610
1652
|
#
|
1611
1653
|
# @option params [required, String] :bucket
|
1612
1654
|
#
|
@@ -2198,8 +2240,44 @@ module Aws::S3
|
|
2198
2240
|
req.send_request(options, &block)
|
2199
2241
|
end
|
2200
2242
|
|
2243
|
+
# Retrieves the policy status for an Amazon S3 bucket, indicating
|
2244
|
+
# whether the bucket is public.
|
2245
|
+
#
|
2246
|
+
# @option params [required, String] :bucket
|
2247
|
+
# The name of the Amazon S3 bucket whose public-policy status you want
|
2248
|
+
# to retrieve.
|
2249
|
+
#
|
2250
|
+
# @return [Types::GetBucketPolicyStatusOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
2251
|
+
#
|
2252
|
+
# * {Types::GetBucketPolicyStatusOutput#policy_status #policy_status} => Types::PolicyStatus
|
2253
|
+
#
|
2254
|
+
# @example Request syntax with placeholder values
|
2255
|
+
#
|
2256
|
+
# resp = client.get_bucket_policy_status({
|
2257
|
+
# bucket: "BucketName", # required
|
2258
|
+
# })
|
2259
|
+
#
|
2260
|
+
# @example Response structure
|
2261
|
+
#
|
2262
|
+
# resp.policy_status.is_public #=> Boolean
|
2263
|
+
#
|
2264
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus AWS API Documentation
|
2265
|
+
#
|
2266
|
+
# @overload get_bucket_policy_status(params = {})
|
2267
|
+
# @param [Hash] params ({})
|
2268
|
+
def get_bucket_policy_status(params = {}, options = {})
|
2269
|
+
req = build_request(:get_bucket_policy_status, params)
|
2270
|
+
req.send_request(options)
|
2271
|
+
end
|
2272
|
+
|
2201
2273
|
# Returns the replication configuration of a bucket.
|
2202
2274
|
#
|
2275
|
+
# <note markdown="1"> It can take a while to propagate the put or delete a replication
|
2276
|
+
# configuration to all Amazon S3 systems. Therefore, a get request soon
|
2277
|
+
# after put or delete can return a wrong result.
|
2278
|
+
#
|
2279
|
+
# </note>
|
2280
|
+
#
|
2203
2281
|
# @option params [required, String] :bucket
|
2204
2282
|
#
|
2205
2283
|
# @return [Types::GetBucketReplicationOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
@@ -2964,6 +3042,39 @@ module Aws::S3
|
|
2964
3042
|
req.send_request(options, &block)
|
2965
3043
|
end
|
2966
3044
|
|
3045
|
+
# Retrieves the Public Access Block configuration for an Amazon S3
|
3046
|
+
# bucket.
|
3047
|
+
#
|
3048
|
+
# @option params [required, String] :bucket
|
3049
|
+
# The name of the Amazon S3 bucket whose Public Access Block
|
3050
|
+
# configuration you want to retrieve.
|
3051
|
+
#
|
3052
|
+
# @return [Types::GetPublicAccessBlockOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
3053
|
+
#
|
3054
|
+
# * {Types::GetPublicAccessBlockOutput#public_access_block_configuration #public_access_block_configuration} => Types::PublicAccessBlockConfiguration
|
3055
|
+
#
|
3056
|
+
# @example Request syntax with placeholder values
|
3057
|
+
#
|
3058
|
+
# resp = client.get_public_access_block({
|
3059
|
+
# bucket: "BucketName", # required
|
3060
|
+
# })
|
3061
|
+
#
|
3062
|
+
# @example Response structure
|
3063
|
+
#
|
3064
|
+
# resp.public_access_block_configuration.block_public_acls #=> Boolean
|
3065
|
+
# resp.public_access_block_configuration.ignore_public_acls #=> Boolean
|
3066
|
+
# resp.public_access_block_configuration.block_public_policy #=> Boolean
|
3067
|
+
# resp.public_access_block_configuration.restrict_public_buckets #=> Boolean
|
3068
|
+
#
|
3069
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock AWS API Documentation
|
3070
|
+
#
|
3071
|
+
# @overload get_public_access_block(params = {})
|
3072
|
+
# @param [Hash] params ({})
|
3073
|
+
def get_public_access_block(params = {}, options = {})
|
3074
|
+
req = build_request(:get_public_access_block, params)
|
3075
|
+
req.send_request(options)
|
3076
|
+
end
|
3077
|
+
|
2967
3078
|
# This operation is useful to determine if a bucket exists and you have
|
2968
3079
|
# permission to access it.
|
2969
3080
|
#
|
@@ -4271,7 +4382,7 @@ module Aws::S3
|
|
4271
4382
|
req.send_request(options)
|
4272
4383
|
end
|
4273
4384
|
|
4274
|
-
# Sets the
|
4385
|
+
# Sets the CORS configuration for a bucket.
|
4275
4386
|
#
|
4276
4387
|
# @option params [required, String] :bucket
|
4277
4388
|
#
|
@@ -4782,8 +4893,9 @@ module Aws::S3
|
|
4782
4893
|
# @option params [required, String] :bucket
|
4783
4894
|
#
|
4784
4895
|
# @option params [required, Types::NotificationConfiguration] :notification_configuration
|
4785
|
-
#
|
4786
|
-
# If this element is empty, notifications are turned off
|
4896
|
+
# A container for specifying the notification configuration of the
|
4897
|
+
# bucket. If this element is empty, notifications are turned off for the
|
4898
|
+
# bucket.
|
4787
4899
|
#
|
4788
4900
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
4789
4901
|
#
|
@@ -4918,18 +5030,18 @@ module Aws::S3
|
|
4918
5030
|
req.send_request(options)
|
4919
5031
|
end
|
4920
5032
|
|
4921
|
-
# Creates a
|
4922
|
-
#
|
4923
|
-
#
|
4924
|
-
#
|
5033
|
+
# Creates a replication configuration or replaces an existing one. For
|
5034
|
+
# more information, see [Cross-Region Replication (CRR)](
|
5035
|
+
# https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html) in the
|
5036
|
+
# *Amazon S3 Developer Guide*.
|
4925
5037
|
#
|
4926
5038
|
# @option params [required, String] :bucket
|
4927
5039
|
#
|
4928
5040
|
# @option params [String] :content_md5
|
4929
5041
|
#
|
4930
5042
|
# @option params [required, Types::ReplicationConfiguration] :replication_configuration
|
4931
|
-
#
|
4932
|
-
#
|
5043
|
+
# A container for replication rules. You can add up to 1,000 rules. The
|
5044
|
+
# maximum size of a replication configuration is 2 MB.
|
4933
5045
|
#
|
4934
5046
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
4935
5047
|
#
|
@@ -5339,7 +5451,7 @@ module Aws::S3
|
|
5339
5451
|
#
|
5340
5452
|
# @option params [String] :tagging
|
5341
5453
|
# The tag-set for the object. The tag-set must be encoded as URL Query
|
5342
|
-
# parameters
|
5454
|
+
# parameters. (For example, "Key1=Value1")
|
5343
5455
|
#
|
5344
5456
|
# @return [Types::PutObjectOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
5345
5457
|
#
|
@@ -5369,42 +5481,43 @@ module Aws::S3
|
|
5369
5481
|
# version_id: "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ",
|
5370
5482
|
# }
|
5371
5483
|
#
|
5372
|
-
# @example Example: To upload
|
5484
|
+
# @example Example: To upload object and specify user-defined metadata
|
5373
5485
|
#
|
5374
|
-
# # The following example
|
5375
|
-
# #
|
5486
|
+
# # The following example creates an object. The request also specifies optional metadata. If the bucket is versioning
|
5487
|
+
# # enabled, S3 returns version ID in response.
|
5376
5488
|
#
|
5377
5489
|
# resp = client.put_object({
|
5378
|
-
# body: "
|
5490
|
+
# body: "filetoupload",
|
5379
5491
|
# bucket: "examplebucket",
|
5380
|
-
# key: "
|
5381
|
-
#
|
5382
|
-
#
|
5492
|
+
# key: "exampleobject",
|
5493
|
+
# metadata: {
|
5494
|
+
# "metadata1" => "value1",
|
5495
|
+
# "metadata2" => "value2",
|
5496
|
+
# },
|
5383
5497
|
# })
|
5384
5498
|
#
|
5385
5499
|
# resp.to_h outputs the following:
|
5386
5500
|
# {
|
5387
5501
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5388
|
-
#
|
5389
|
-
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
5502
|
+
# version_id: "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0",
|
5390
5503
|
# }
|
5391
5504
|
#
|
5392
|
-
# @example Example: To upload an object and specify
|
5505
|
+
# @example Example: To upload an object and specify optional tags
|
5393
5506
|
#
|
5394
|
-
# # The following example uploads
|
5395
|
-
# #
|
5507
|
+
# # The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore
|
5508
|
+
# # S3 returns version ID of the newly created object.
|
5396
5509
|
#
|
5397
5510
|
# resp = client.put_object({
|
5398
|
-
#
|
5399
|
-
# body: "filetoupload",
|
5511
|
+
# body: "c:\\HappyFace.jpg",
|
5400
5512
|
# bucket: "examplebucket",
|
5401
|
-
# key: "
|
5513
|
+
# key: "HappyFace.jpg",
|
5514
|
+
# tagging: "key1=value1&key2=value2",
|
5402
5515
|
# })
|
5403
5516
|
#
|
5404
5517
|
# resp.to_h outputs the following:
|
5405
5518
|
# {
|
5406
5519
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5407
|
-
# version_id: "
|
5520
|
+
# version_id: "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a",
|
5408
5521
|
# }
|
5409
5522
|
#
|
5410
5523
|
# @example Example: To upload an object
|
@@ -5424,43 +5537,42 @@ module Aws::S3
|
|
5424
5537
|
# version_id: "tpf3zF08nBplQK1XLOefGskR7mGDwcDk",
|
5425
5538
|
# }
|
5426
5539
|
#
|
5427
|
-
# @example Example: To upload object and specify
|
5540
|
+
# @example Example: To upload an object and specify canned ACL.
|
5428
5541
|
#
|
5429
|
-
# # The following example
|
5430
|
-
# # enabled, S3 returns version ID in response.
|
5542
|
+
# # The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ
|
5543
|
+
# # access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.
|
5431
5544
|
#
|
5432
5545
|
# resp = client.put_object({
|
5546
|
+
# acl: "authenticated-read",
|
5433
5547
|
# body: "filetoupload",
|
5434
5548
|
# bucket: "examplebucket",
|
5435
5549
|
# key: "exampleobject",
|
5436
|
-
# metadata: {
|
5437
|
-
# "metadata1" => "value1",
|
5438
|
-
# "metadata2" => "value2",
|
5439
|
-
# },
|
5440
5550
|
# })
|
5441
5551
|
#
|
5442
5552
|
# resp.to_h outputs the following:
|
5443
5553
|
# {
|
5444
5554
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5445
|
-
# version_id: "
|
5555
|
+
# version_id: "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr",
|
5446
5556
|
# }
|
5447
5557
|
#
|
5448
|
-
# @example Example: To upload an object
|
5558
|
+
# @example Example: To upload an object (specify optional headers)
|
5449
5559
|
#
|
5450
|
-
# # The following example uploads an object. The request specifies optional
|
5451
|
-
# #
|
5560
|
+
# # The following example uploads an object. The request specifies optional request headers to directs S3 to use specific
|
5561
|
+
# # storage class and use server-side encryption.
|
5452
5562
|
#
|
5453
5563
|
# resp = client.put_object({
|
5454
|
-
# body: "
|
5564
|
+
# body: "HappyFace.jpg",
|
5455
5565
|
# bucket: "examplebucket",
|
5456
5566
|
# key: "HappyFace.jpg",
|
5457
|
-
#
|
5567
|
+
# server_side_encryption: "AES256",
|
5568
|
+
# storage_class: "STANDARD_IA",
|
5458
5569
|
# })
|
5459
5570
|
#
|
5460
5571
|
# resp.to_h outputs the following:
|
5461
5572
|
# {
|
5462
5573
|
# etag: "\"6805f2cfc46c0f04559748bb039d69ae\"",
|
5463
|
-
#
|
5574
|
+
# server_side_encryption: "AES256",
|
5575
|
+
# version_id: "CG612hodqujkf8FaaNfp8U..FIhLROcp",
|
5464
5576
|
# }
|
5465
5577
|
#
|
5466
5578
|
# @example Example: To upload an object and specify server-side encryption and object tags
|
@@ -5726,6 +5838,44 @@ module Aws::S3
|
|
5726
5838
|
req.send_request(options)
|
5727
5839
|
end
|
5728
5840
|
|
5841
|
+
# Creates or modifies the Public Access Block configuration for an
|
5842
|
+
# Amazon S3 bucket.
|
5843
|
+
#
|
5844
|
+
# @option params [required, String] :bucket
|
5845
|
+
# The name of the Amazon S3 bucket whose Public Access Block
|
5846
|
+
# configuration you want to set.
|
5847
|
+
#
|
5848
|
+
# @option params [String] :content_md5
|
5849
|
+
# The MD5 hash of the `PutPublicBlock` request body.
|
5850
|
+
#
|
5851
|
+
# @option params [required, Types::PublicAccessBlockConfiguration] :public_access_block_configuration
|
5852
|
+
# The Public Access Block configuration that you want to apply to this
|
5853
|
+
# Amazon S3 bucket.
|
5854
|
+
#
|
5855
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
5856
|
+
#
|
5857
|
+
# @example Request syntax with placeholder values
|
5858
|
+
#
|
5859
|
+
# resp = client.put_public_access_block({
|
5860
|
+
# bucket: "BucketName", # required
|
5861
|
+
# content_md5: "ContentMD5",
|
5862
|
+
# public_access_block_configuration: { # required
|
5863
|
+
# block_public_acls: false,
|
5864
|
+
# ignore_public_acls: false,
|
5865
|
+
# block_public_policy: false,
|
5866
|
+
# restrict_public_buckets: false,
|
5867
|
+
# },
|
5868
|
+
# })
|
5869
|
+
#
|
5870
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock AWS API Documentation
|
5871
|
+
#
|
5872
|
+
# @overload put_public_access_block(params = {})
|
5873
|
+
# @param [Hash] params ({})
|
5874
|
+
def put_public_access_block(params = {}, options = {})
|
5875
|
+
req = build_request(:put_public_access_block, params)
|
5876
|
+
req.send_request(options)
|
5877
|
+
end
|
5878
|
+
|
5729
5879
|
# Restores an archived copy of an object back into Amazon S3
|
5730
5880
|
#
|
5731
5881
|
# @option params [required, String] :bucket
|
@@ -5882,14 +6032,14 @@ module Aws::S3
|
|
5882
6032
|
# serialization format for the response.
|
5883
6033
|
#
|
5884
6034
|
# @option params [required, String] :bucket
|
5885
|
-
# The S3
|
6035
|
+
# The S3 bucket.
|
5886
6036
|
#
|
5887
6037
|
# @option params [required, String] :key
|
5888
|
-
# The
|
6038
|
+
# The object key.
|
5889
6039
|
#
|
5890
6040
|
# @option params [String] :sse_customer_algorithm
|
5891
|
-
# The SSE Algorithm used to encrypt the object. For more information,
|
5892
|
-
#
|
6041
|
+
# The SSE Algorithm used to encrypt the object. For more information,
|
6042
|
+
# see [ Server-Side Encryption (Using Customer-Provided Encryption
|
5893
6043
|
# Keys][1].
|
5894
6044
|
#
|
5895
6045
|
#
|
@@ -5897,7 +6047,7 @@ module Aws::S3
|
|
5897
6047
|
# [1]: http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
5898
6048
|
#
|
5899
6049
|
# @option params [String] :sse_customer_key
|
5900
|
-
# The SSE Customer Key. For more information,
|
6050
|
+
# The SSE Customer Key. For more information, see [ Server-Side
|
5901
6051
|
# Encryption (Using Customer-Provided Encryption Keys][1].
|
5902
6052
|
#
|
5903
6053
|
#
|
@@ -5905,7 +6055,7 @@ module Aws::S3
|
|
5905
6055
|
# [1]: http://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html
|
5906
6056
|
#
|
5907
6057
|
# @option params [String] :sse_customer_key_md5
|
5908
|
-
# The SSE Customer Key MD5. For more information,
|
6058
|
+
# The SSE Customer Key MD5. For more information, see [ Server-Side
|
5909
6059
|
# Encryption (Using Customer-Provided Encryption Keys][1].
|
5910
6060
|
#
|
5911
6061
|
#
|
@@ -5916,7 +6066,7 @@ module Aws::S3
|
|
5916
6066
|
# The expression that is used to query the object.
|
5917
6067
|
#
|
5918
6068
|
# @option params [required, String] :expression_type
|
5919
|
-
# The type of the provided expression (
|
6069
|
+
# The type of the provided expression (for example., SQL).
|
5920
6070
|
#
|
5921
6071
|
# @option params [Types::RequestProgress] :request_progress
|
5922
6072
|
# Specifies if periodic request progress information should be enabled.
|
@@ -6355,45 +6505,45 @@ module Aws::S3
|
|
6355
6505
|
# * {Types::UploadPartCopyOutput#request_charged #request_charged} => String
|
6356
6506
|
#
|
6357
6507
|
#
|
6358
|
-
# @example Example: To upload a part by copying
|
6508
|
+
# @example Example: To upload a part by copying byte range from an existing object as data source
|
6359
6509
|
#
|
6360
|
-
# # The following example uploads a part of a multipart upload by copying
|
6510
|
+
# # The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as
|
6511
|
+
# # data source.
|
6361
6512
|
#
|
6362
6513
|
# resp = client.upload_part_copy({
|
6363
6514
|
# bucket: "examplebucket",
|
6364
6515
|
# copy_source: "/bucketname/sourceobjectkey",
|
6516
|
+
# copy_source_range: "bytes=1-100000",
|
6365
6517
|
# key: "examplelargeobject",
|
6366
|
-
# part_number:
|
6518
|
+
# part_number: 2,
|
6367
6519
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
6368
6520
|
# })
|
6369
6521
|
#
|
6370
6522
|
# resp.to_h outputs the following:
|
6371
6523
|
# {
|
6372
6524
|
# copy_part_result: {
|
6373
|
-
# etag: "\"
|
6374
|
-
# last_modified: Time.parse("2016-12-29T21:
|
6525
|
+
# etag: "\"65d16d19e65a7508a51f043180edcc36\"",
|
6526
|
+
# last_modified: Time.parse("2016-12-29T21:44:28.000Z"),
|
6375
6527
|
# },
|
6376
6528
|
# }
|
6377
6529
|
#
|
6378
|
-
# @example Example: To upload a part by copying
|
6530
|
+
# @example Example: To upload a part by copying data from an existing object as data source
|
6379
6531
|
#
|
6380
|
-
# # The following example uploads a part of a multipart upload by copying
|
6381
|
-
# # data source.
|
6532
|
+
# # The following example uploads a part of a multipart upload by copying data from an existing object as data source.
|
6382
6533
|
#
|
6383
6534
|
# resp = client.upload_part_copy({
|
6384
6535
|
# bucket: "examplebucket",
|
6385
6536
|
# copy_source: "/bucketname/sourceobjectkey",
|
6386
|
-
# copy_source_range: "bytes=1-100000",
|
6387
6537
|
# key: "examplelargeobject",
|
6388
|
-
# part_number:
|
6538
|
+
# part_number: 1,
|
6389
6539
|
# upload_id: "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--",
|
6390
6540
|
# })
|
6391
6541
|
#
|
6392
6542
|
# resp.to_h outputs the following:
|
6393
6543
|
# {
|
6394
6544
|
# copy_part_result: {
|
6395
|
-
# etag: "\"
|
6396
|
-
# last_modified: Time.parse("2016-12-29T21:
|
6545
|
+
# etag: "\"b0c6f0e7e054ab8fa2536a2677f8734d\"",
|
6546
|
+
# last_modified: Time.parse("2016-12-29T21:24:43.000Z"),
|
6397
6547
|
# },
|
6398
6548
|
# }
|
6399
6549
|
#
|
@@ -6452,7 +6602,7 @@ module Aws::S3
|
|
6452
6602
|
params: params,
|
6453
6603
|
config: config)
|
6454
6604
|
context[:gem_name] = 'aws-sdk-s3'
|
6455
|
-
context[:gem_version] = '1.
|
6605
|
+
context[:gem_version] = '1.24.0'
|
6456
6606
|
Seahorse::Client::Request.new(handlers, context)
|
6457
6607
|
end
|
6458
6608
|
|