Class: Aws::S3::Client
- Inherits:
-
Seahorse::Client::Base
- Object
- Seahorse::Client::Base
- Aws::S3::Client
- Includes:
- ClientStubs
- Defined in:
- lib/aws-sdk-s3/client.rb
Class Attribute Summary collapse
- .identifier ⇒ Object readonly private
API Operations collapse
-
#abort_multipart_upload(params = {}) ⇒ Types::AbortMultipartUploadOutput
Aborts a multipart upload.
-
#complete_multipart_upload(params = {}) ⇒ Types::CompleteMultipartUploadOutput
Completes a multipart upload by assembling previously uploaded parts.
-
#copy_object(params = {}) ⇒ Types::CopyObjectOutput
Creates a copy of an object that is already stored in Amazon S3.
-
#create_bucket(params = {}) ⇒ Types::CreateBucketOutput
Creates a new bucket.
-
#create_multipart_upload(params = {}) ⇒ Types::CreateMultipartUploadOutput
Initiates a multipart upload and returns an upload ID.
-
#delete_bucket(params = {}) ⇒ Struct
Deletes the bucket.
-
#delete_bucket_analytics_configuration(params = {}) ⇒ Struct
Deletes an analytics configuration for the bucket (specified by the analytics configuration ID).
-
#delete_bucket_cors(params = {}) ⇒ Struct
Deletes the cors configuration information set for the bucket.
-
#delete_bucket_inventory_configuration(params = {}) ⇒ Struct
Deletes an inventory configuration (identified by the inventory ID) from the bucket.
-
#delete_bucket_lifecycle(params = {}) ⇒ Struct
Deletes the lifecycle configuration from the bucket.
-
#delete_bucket_metrics_configuration(params = {}) ⇒ Struct
Deletes a metrics configuration (specified by the metrics configuration ID) from the bucket.
-
#delete_bucket_policy(params = {}) ⇒ Struct
Deletes the policy from the bucket.
-
#delete_bucket_replication(params = {}) ⇒ Struct
Deletes the replication configuration from the bucket.
-
#delete_bucket_tagging(params = {}) ⇒ Struct
Deletes the tags from the bucket.
-
#delete_bucket_website(params = {}) ⇒ Struct
This operation removes the website configuration from the bucket.
-
#delete_object(params = {}) ⇒ Types::DeleteObjectOutput
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object.
-
#delete_object_tagging(params = {}) ⇒ Types::DeleteObjectTaggingOutput
Removes the tag-set from an existing object.
-
#delete_objects(params = {}) ⇒ Types::DeleteObjectsOutput
This operation enables you to delete multiple objects from a bucket using a single HTTP request.
-
#get_bucket_accelerate_configuration(params = {}) ⇒ Types::GetBucketAccelerateConfigurationOutput
Returns the accelerate configuration of a bucket.
-
#get_bucket_acl(params = {}) ⇒ Types::GetBucketAclOutput
Gets the access control policy for the bucket.
-
#get_bucket_analytics_configuration(params = {}) ⇒ Types::GetBucketAnalyticsConfigurationOutput
Gets an analytics configuration for the bucket (specified by the analytics configuration ID).
-
#get_bucket_cors(params = {}) ⇒ Types::GetBucketCorsOutput
Returns the cors configuration for the bucket.
-
#get_bucket_inventory_configuration(params = {}) ⇒ Types::GetBucketInventoryConfigurationOutput
Returns an inventory configuration (identified by the inventory ID) from the bucket.
-
#get_bucket_lifecycle(params = {}) ⇒ Types::GetBucketLifecycleOutput
Deprecated, see the GetBucketLifecycleConfiguration operation.
-
#get_bucket_lifecycle_configuration(params = {}) ⇒ Types::GetBucketLifecycleConfigurationOutput
Returns the lifecycle configuration information set on the bucket.
-
#get_bucket_location(params = {}) ⇒ Types::GetBucketLocationOutput
Returns the region the bucket resides in.
-
#get_bucket_logging(params = {}) ⇒ Types::GetBucketLoggingOutput
Returns the logging status of a bucket and the permissions users have to view and modify that status.
-
#get_bucket_metrics_configuration(params = {}) ⇒ Types::GetBucketMetricsConfigurationOutput
Gets a metrics configuration (specified by the metrics configuration ID) from the bucket.
-
#get_bucket_notification(params = {}) ⇒ Types::NotificationConfigurationDeprecated
Deprecated, see the GetBucketNotificationConfiguration operation.
-
#get_bucket_notification_configuration(params = {}) ⇒ Types::NotificationConfiguration
Returns the notification configuration of a bucket.
-
#get_bucket_policy(params = {}) ⇒ Types::GetBucketPolicyOutput
Returns the policy of a specified bucket.
-
#get_bucket_replication(params = {}) ⇒ Types::GetBucketReplicationOutput
Returns the replication configuration of a bucket.
-
#get_bucket_request_payment(params = {}) ⇒ Types::GetBucketRequestPaymentOutput
Returns the request payment configuration of a bucket.
-
#get_bucket_tagging(params = {}) ⇒ Types::GetBucketTaggingOutput
Returns the tag set associated with the bucket.
-
#get_bucket_versioning(params = {}) ⇒ Types::GetBucketVersioningOutput
Returns the versioning state of a bucket.
-
#get_bucket_website(params = {}) ⇒ Types::GetBucketWebsiteOutput
Returns the website configuration for a bucket.
-
#get_object(params = {}) ⇒ Types::GetObjectOutput
Retrieves objects from Amazon S3.
-
#get_object_acl(params = {}) ⇒ Types::GetObjectAclOutput
Returns the access control list (ACL) of an object.
-
#get_object_tagging(params = {}) ⇒ Types::GetObjectTaggingOutput
Returns the tag-set of an object.
-
#get_object_torrent(params = {}) ⇒ Types::GetObjectTorrentOutput
Return torrent files from a bucket.
-
#head_bucket(params = {}) ⇒ Struct
This operation is useful to determine if a bucket exists and you have permission to access it.
-
#head_object(params = {}) ⇒ Types::HeadObjectOutput
The HEAD operation retrieves metadata from an object without returning the object itself.
-
#list_bucket_analytics_configurations(params = {}) ⇒ Types::ListBucketAnalyticsConfigurationsOutput
Lists the analytics configurations for the bucket.
-
#list_bucket_inventory_configurations(params = {}) ⇒ Types::ListBucketInventoryConfigurationsOutput
Returns a list of inventory configurations for the bucket.
-
#list_bucket_metrics_configurations(params = {}) ⇒ Types::ListBucketMetricsConfigurationsOutput
Lists the metrics configurations for the bucket.
-
#list_buckets(params = {}) ⇒ Types::ListBucketsOutput
Returns a list of all buckets owned by the authenticated sender of the request.
-
#list_multipart_uploads(params = {}) ⇒ Types::ListMultipartUploadsOutput
This operation lists in-progress multipart uploads.
-
#list_object_versions(params = {}) ⇒ Types::ListObjectVersionsOutput
Returns metadata about all of the versions of objects in a bucket.
-
#list_objects(params = {}) ⇒ Types::ListObjectsOutput
Returns some or all (up to 1000) of the objects in a bucket.
-
#list_objects_v2(params = {}) ⇒ Types::ListObjectsV2Output
Returns some or all (up to 1000) of the objects in a bucket.
-
#list_parts(params = {}) ⇒ Types::ListPartsOutput
Lists the parts that have been uploaded for a specific multipart upload.
-
#put_bucket_accelerate_configuration(params = {}) ⇒ Struct
Sets the accelerate configuration of an existing bucket.
-
#put_bucket_acl(params = {}) ⇒ Struct
Sets the permissions on a bucket using access control lists (ACL).
-
#put_bucket_analytics_configuration(params = {}) ⇒ Struct
Sets an analytics configuration for the bucket (specified by the analytics configuration ID).
-
#put_bucket_cors(params = {}) ⇒ Struct
Sets the cors configuration for a bucket.
-
#put_bucket_inventory_configuration(params = {}) ⇒ Struct
Adds an inventory configuration (identified by the inventory ID) from the bucket.
-
#put_bucket_lifecycle(params = {}) ⇒ Struct
Deprecated, see the PutBucketLifecycleConfiguration operation.
-
#put_bucket_lifecycle_configuration(params = {}) ⇒ Struct
Sets lifecycle configuration for your bucket.
-
#put_bucket_logging(params = {}) ⇒ Struct
Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters.
-
#put_bucket_metrics_configuration(params = {}) ⇒ Struct
Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.
-
#put_bucket_notification(params = {}) ⇒ Struct
Deprecated, see the PutBucketNotificationConfiguraiton operation.
-
#put_bucket_notification_configuration(params = {}) ⇒ Struct
Enables notifications of specified events for a bucket.
-
#put_bucket_policy(params = {}) ⇒ Struct
Replaces a policy on a bucket.
-
#put_bucket_replication(params = {}) ⇒ Struct
Creates a new replication configuration (or replaces an existing one, if present).
-
#put_bucket_request_payment(params = {}) ⇒ Struct
Sets the request payment configuration for a bucket.
-
#put_bucket_tagging(params = {}) ⇒ Struct
Sets the tags for a bucket.
-
#put_bucket_versioning(params = {}) ⇒ Struct
Sets the versioning state of an existing bucket.
-
#put_bucket_website(params = {}) ⇒ Struct
Set the website configuration for a bucket.
-
#put_object(params = {}) ⇒ Types::PutObjectOutput
Adds an object to a bucket.
-
#put_object_acl(params = {}) ⇒ Types::PutObjectAclOutput
uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket.
-
#put_object_tagging(params = {}) ⇒ Types::PutObjectTaggingOutput
Sets the supplied tag-set to an object that already exists in a bucket.
-
#restore_object(params = {}) ⇒ Types::RestoreObjectOutput
Restores an archived copy of an object back into Amazon S3.
-
#upload_part(params = {}) ⇒ Types::UploadPartOutput
Uploads a part in a multipart upload.
-
#upload_part_copy(params = {}) ⇒ Types::UploadPartCopyOutput
Uploads a part by copying data from an existing object as data source.
Class Method Summary collapse
- .errors_module ⇒ Object private
Instance Method Summary collapse
- #build_request(operation_name, params = {}) ⇒ Object private
-
#initialize(*args) ⇒ Client
constructor
A new instance of Client.
-
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
- #waiter_names ⇒ Object deprecated private Deprecated.
Constructor Details
#initialize(*args) ⇒ Client
Returns a new instance of Client.
196 197 198 |
# File 'lib/aws-sdk-s3/client.rb', line 196 def initialize(*args) super end |
Class Attribute Details
.identifier ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6003 6004 6005 |
# File 'lib/aws-sdk-s3/client.rb', line 6003 def identifier @identifier end |
Class Method Details
Instance Method Details
#abort_multipart_upload(params = {}) ⇒ Types::AbortMultipartUploadOutput
Aborts a multipart upload.
To verify that all parts have been removed, so you don’t get charged for the part storage, you should call the List Parts operation and ensure the parts list is empty.
257 258 259 260 |
# File 'lib/aws-sdk-s3/client.rb', line 257 def abort_multipart_upload(params = {}, = {}) req = build_request(:abort_multipart_upload, params) req.send_request() end |
#build_request(operation_name, params = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 |
# File 'lib/aws-sdk-s3/client.rb', line 5862 def build_request(operation_name, params = {}) handlers = @handlers.for(operation_name) context = Seahorse::Client::RequestContext.new( operation_name: operation_name, operation: config.api.operation(operation_name), client: self, params: params, config: config) context[:gem_name] = 'aws-sdk-s3' context[:gem_version] = '1.0.0' Seahorse::Client::Request.new(handlers, context) end |
#complete_multipart_upload(params = {}) ⇒ Types::CompleteMultipartUploadOutput
Completes a multipart upload by assembling previously uploaded parts.
355 356 357 358 |
# File 'lib/aws-sdk-s3/client.rb', line 355 def complete_multipart_upload(params = {}, = {}) req = build_request(:complete_multipart_upload, params) req.send_request() end |
#copy_object(params = {}) ⇒ Types::CopyObjectOutput
Creates a copy of an object that is already stored in Amazon S3.
580 581 582 583 |
# File 'lib/aws-sdk-s3/client.rb', line 580 def copy_object(params = {}, = {}) req = build_request(:copy_object, params) req.send_request() end |
#create_bucket(params = {}) ⇒ Types::CreateBucketOutput
Creates a new bucket.
668 669 670 671 |
# File 'lib/aws-sdk-s3/client.rb', line 668 def create_bucket(params = {}, = {}) req = build_request(:create_bucket, params) req.send_request() end |
#create_multipart_upload(params = {}) ⇒ Types::CreateMultipartUploadOutput
Initiates a multipart upload and returns an upload ID.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
847 848 849 850 |
# File 'lib/aws-sdk-s3/client.rb', line 847 def create_multipart_upload(params = {}, = {}) req = build_request(:create_multipart_upload, params) req.send_request() end |
#delete_bucket(params = {}) ⇒ Struct
Deletes the bucket. All objects (including all object versions and Delete Markers) in the bucket must be deleted before the bucket itself can be deleted.
879 880 881 882 |
# File 'lib/aws-sdk-s3/client.rb', line 879 def delete_bucket(params = {}, = {}) req = build_request(:delete_bucket, params) req.send_request() end |
#delete_bucket_analytics_configuration(params = {}) ⇒ Struct
Deletes an analytics configuration for the bucket (specified by the analytics configuration ID).
907 908 909 910 |
# File 'lib/aws-sdk-s3/client.rb', line 907 def delete_bucket_analytics_configuration(params = {}, = {}) req = build_request(:delete_bucket_analytics_configuration, params) req.send_request() end |
#delete_bucket_cors(params = {}) ⇒ Struct
Deletes the cors configuration information set for the bucket.
937 938 939 940 |
# File 'lib/aws-sdk-s3/client.rb', line 937 def delete_bucket_cors(params = {}, = {}) req = build_request(:delete_bucket_cors, params) req.send_request() end |
#delete_bucket_inventory_configuration(params = {}) ⇒ Struct
Deletes an inventory configuration (identified by the inventory ID) from the bucket.
965 966 967 968 |
# File 'lib/aws-sdk-s3/client.rb', line 965 def delete_bucket_inventory_configuration(params = {}, = {}) req = build_request(:delete_bucket_inventory_configuration, params) req.send_request() end |
#delete_bucket_lifecycle(params = {}) ⇒ Struct
Deletes the lifecycle configuration from the bucket.
995 996 997 998 |
# File 'lib/aws-sdk-s3/client.rb', line 995 def delete_bucket_lifecycle(params = {}, = {}) req = build_request(:delete_bucket_lifecycle, params) req.send_request() end |
#delete_bucket_metrics_configuration(params = {}) ⇒ Struct
Deletes a metrics configuration (specified by the metrics configuration ID) from the bucket.
1022 1023 1024 1025 |
# File 'lib/aws-sdk-s3/client.rb', line 1022 def delete_bucket_metrics_configuration(params = {}, = {}) req = build_request(:delete_bucket_metrics_configuration, params) req.send_request() end |
#delete_bucket_policy(params = {}) ⇒ Struct
Deletes the policy from the bucket.
1052 1053 1054 1055 |
# File 'lib/aws-sdk-s3/client.rb', line 1052 def delete_bucket_policy(params = {}, = {}) req = build_request(:delete_bucket_policy, params) req.send_request() end |
#delete_bucket_replication(params = {}) ⇒ Struct
Deletes the replication configuration from the bucket.
1082 1083 1084 1085 |
# File 'lib/aws-sdk-s3/client.rb', line 1082 def delete_bucket_replication(params = {}, = {}) req = build_request(:delete_bucket_replication, params) req.send_request() end |
#delete_bucket_tagging(params = {}) ⇒ Struct
Deletes the tags from the bucket.
1112 1113 1114 1115 |
# File 'lib/aws-sdk-s3/client.rb', line 1112 def delete_bucket_tagging(params = {}, = {}) req = build_request(:delete_bucket_tagging, params) req.send_request() end |
#delete_bucket_website(params = {}) ⇒ Struct
This operation removes the website configuration from the bucket.
1142 1143 1144 1145 |
# File 'lib/aws-sdk-s3/client.rb', line 1142 def delete_bucket_website(params = {}, = {}) req = build_request(:delete_bucket_website, params) req.send_request() end |
#delete_object(params = {}) ⇒ Types::DeleteObjectOutput
Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. If there isn’t a null version, Amazon S3 does not remove any objects.
1218 1219 1220 1221 |
# File 'lib/aws-sdk-s3/client.rb', line 1218 def delete_object(params = {}, = {}) req = build_request(:delete_object, params) req.send_request() end |
#delete_object_tagging(params = {}) ⇒ Types::DeleteObjectTaggingOutput
Removes the tag-set from an existing object.
1282 1283 1284 1285 |
# File 'lib/aws-sdk-s3/client.rb', line 1282 def delete_object_tagging(params = {}, = {}) req = build_request(:delete_object_tagging, params) req.send_request() end |
#delete_objects(params = {}) ⇒ Types::DeleteObjectsOutput
This operation enables you to delete multiple objects from a bucket using a single HTTP request. You may specify up to 1000 keys.
1417 1418 1419 1420 |
# File 'lib/aws-sdk-s3/client.rb', line 1417 def delete_objects(params = {}, = {}) req = build_request(:delete_objects, params) req.send_request() end |
#get_bucket_accelerate_configuration(params = {}) ⇒ Types::GetBucketAccelerateConfigurationOutput
Returns the accelerate configuration of a bucket.
1446 1447 1448 1449 |
# File 'lib/aws-sdk-s3/client.rb', line 1446 def get_bucket_accelerate_configuration(params = {}, = {}) req = build_request(:get_bucket_accelerate_configuration, params) req.send_request() end |
#get_bucket_acl(params = {}) ⇒ Types::GetBucketAclOutput
Gets the access control policy for the bucket.
1482 1483 1484 1485 |
# File 'lib/aws-sdk-s3/client.rb', line 1482 def get_bucket_acl(params = {}, = {}) req = build_request(:get_bucket_acl, params) req.send_request() end |
#get_bucket_analytics_configuration(params = {}) ⇒ Types::GetBucketAnalyticsConfigurationOutput
Gets an analytics configuration for the bucket (specified by the analytics configuration ID).
1528 1529 1530 1531 |
# File 'lib/aws-sdk-s3/client.rb', line 1528 def get_bucket_analytics_configuration(params = {}, = {}) req = build_request(:get_bucket_analytics_configuration, params) req.send_request() end |
#get_bucket_cors(params = {}) ⇒ Types::GetBucketCorsOutput
Returns the cors configuration for the bucket.
1591 1592 1593 1594 |
# File 'lib/aws-sdk-s3/client.rb', line 1591 def get_bucket_cors(params = {}, = {}) req = build_request(:get_bucket_cors, params) req.send_request() end |
#get_bucket_inventory_configuration(params = {}) ⇒ Types::GetBucketInventoryConfigurationOutput
Returns an inventory configuration (identified by the inventory ID) from the bucket.
1635 1636 1637 1638 |
# File 'lib/aws-sdk-s3/client.rb', line 1635 def get_bucket_inventory_configuration(params = {}, = {}) req = build_request(:get_bucket_inventory_configuration, params) req.send_request() end |
#get_bucket_lifecycle(params = {}) ⇒ Types::GetBucketLifecycleOutput
Deprecated, see the GetBucketLifecycleConfiguration operation.
1698 1699 1700 1701 |
# File 'lib/aws-sdk-s3/client.rb', line 1698 def get_bucket_lifecycle(params = {}, = {}) req = build_request(:get_bucket_lifecycle, params) req.send_request() end |
#get_bucket_lifecycle_configuration(params = {}) ⇒ Types::GetBucketLifecycleConfigurationOutput
Returns the lifecycle configuration information set on the bucket.
1773 1774 1775 1776 |
# File 'lib/aws-sdk-s3/client.rb', line 1773 def get_bucket_lifecycle_configuration(params = {}, = {}) req = build_request(:get_bucket_lifecycle_configuration, params) req.send_request() end |
#get_bucket_location(params = {}) ⇒ Types::GetBucketLocationOutput
Returns the region the bucket resides in.
1814 1815 1816 1817 |
# File 'lib/aws-sdk-s3/client.rb', line 1814 def get_bucket_location(params = {}, = {}) req = build_request(:get_bucket_location, params) req.send_request() end |
#get_bucket_logging(params = {}) ⇒ Types::GetBucketLoggingOutput
Returns the logging status of a bucket and the permissions users have to view and modify that status. To use GET, you must be the bucket owner.
1851 1852 1853 1854 |
# File 'lib/aws-sdk-s3/client.rb', line 1851 def get_bucket_logging(params = {}, = {}) req = build_request(:get_bucket_logging, params) req.send_request() end |
#get_bucket_metrics_configuration(params = {}) ⇒ Types::GetBucketMetricsConfigurationOutput
Gets a metrics configuration (specified by the metrics configuration ID) from the bucket.
1892 1893 1894 1895 |
# File 'lib/aws-sdk-s3/client.rb', line 1892 def get_bucket_metrics_configuration(params = {}, = {}) req = build_request(:get_bucket_metrics_configuration, params) req.send_request() end |
#get_bucket_notification(params = {}) ⇒ Types::NotificationConfigurationDeprecated
Deprecated, see the GetBucketNotificationConfiguration operation.
1994 1995 1996 1997 |
# File 'lib/aws-sdk-s3/client.rb', line 1994 def get_bucket_notification(params = {}, = {}) req = build_request(:get_bucket_notification, params) req.send_request() end |
#get_bucket_notification_configuration(params = {}) ⇒ Types::NotificationConfiguration
Returns the notification configuration of a bucket.
2047 2048 2049 2050 |
# File 'lib/aws-sdk-s3/client.rb', line 2047 def get_bucket_notification_configuration(params = {}, = {}) req = build_request(:get_bucket_notification_configuration, params) req.send_request() end |
#get_bucket_policy(params = {}) ⇒ Types::GetBucketPolicyOutput
Returns the policy of a specified bucket.
2088 2089 2090 2091 |
# File 'lib/aws-sdk-s3/client.rb', line 2088 def get_bucket_policy(params = {}, = {}) req = build_request(:get_bucket_policy, params) req.send_request() end |
#get_bucket_replication(params = {}) ⇒ Types::GetBucketReplicationOutput
Returns the replication configuration of a bucket.
2147 2148 2149 2150 |
# File 'lib/aws-sdk-s3/client.rb', line 2147 def get_bucket_replication(params = {}, = {}) req = build_request(:get_bucket_replication, params) req.send_request() end |
#get_bucket_request_payment(params = {}) ⇒ Types::GetBucketRequestPaymentOutput
Returns the request payment configuration of a bucket.
2188 2189 2190 2191 |
# File 'lib/aws-sdk-s3/client.rb', line 2188 def get_bucket_request_payment(params = {}, = {}) req = build_request(:get_bucket_request_payment, params) req.send_request() end |
#get_bucket_tagging(params = {}) ⇒ Types::GetBucketTaggingOutput
Returns the tag set associated with the bucket.
2240 2241 2242 2243 |
# File 'lib/aws-sdk-s3/client.rb', line 2240 def get_bucket_tagging(params = {}, = {}) req = build_request(:get_bucket_tagging, params) req.send_request() end |
#get_bucket_versioning(params = {}) ⇒ Types::GetBucketVersioningOutput
Returns the versioning state of a bucket.
2284 2285 2286 2287 |
# File 'lib/aws-sdk-s3/client.rb', line 2284 def get_bucket_versioning(params = {}, = {}) req = build_request(:get_bucket_versioning, params) req.send_request() end |
#get_bucket_website(params = {}) ⇒ Types::GetBucketWebsiteOutput
Returns the website configuration for a bucket.
2344 2345 2346 2347 |
# File 'lib/aws-sdk-s3/client.rb', line 2344 def get_bucket_website(params = {}, = {}) req = build_request(:get_bucket_website, params) req.send_request() end |
#get_object(params = {}) ⇒ Types::GetObjectOutput
Retrieves objects from Amazon S3.
2595 2596 2597 2598 |
# File 'lib/aws-sdk-s3/client.rb', line 2595 def get_object(params = {}, = {}) req = build_request(:get_object, params) req.send_request() end |
#get_object_acl(params = {}) ⇒ Types::GetObjectAclOutput
Returns the access control list (ACL) of an object.
2700 2701 2702 2703 |
# File 'lib/aws-sdk-s3/client.rb', line 2700 def get_object_acl(params = {}, = {}) req = build_request(:get_object_acl, params) req.send_request() end |
#get_object_tagging(params = {}) ⇒ Types::GetObjectTaggingOutput
Returns the tag-set of an object.
2783 2784 2785 2786 |
# File 'lib/aws-sdk-s3/client.rb', line 2783 def get_object_tagging(params = {}, = {}) req = build_request(:get_object_tagging, params) req.send_request() end |
#get_object_torrent(params = {}) ⇒ Types::GetObjectTorrentOutput
Return torrent files from a bucket.
2840 2841 2842 2843 |
# File 'lib/aws-sdk-s3/client.rb', line 2840 def get_object_torrent(params = {}, = {}) req = build_request(:get_object_torrent, params) req.send_request() end |
#head_bucket(params = {}) ⇒ Struct
This operation is useful to determine if a bucket exists and you have permission to access it.
2871 2872 2873 2874 |
# File 'lib/aws-sdk-s3/client.rb', line 2871 def head_bucket(params = {}, = {}) req = build_request(:head_bucket, params) req.send_request() end |
#head_object(params = {}) ⇒ Types::HeadObjectOutput
The HEAD operation retrieves metadata from an object without returning the object itself. This operation is useful if you’re only interested in an object’s metadata. To use HEAD, you must have READ access to the object.
3041 3042 3043 3044 |
# File 'lib/aws-sdk-s3/client.rb', line 3041 def head_object(params = {}, = {}) req = build_request(:head_object, params) req.send_request() end |
#list_bucket_analytics_configurations(params = {}) ⇒ Types::ListBucketAnalyticsConfigurationsOutput
Lists the analytics configurations for the bucket.
3094 3095 3096 3097 |
# File 'lib/aws-sdk-s3/client.rb', line 3094 def list_bucket_analytics_configurations(params = {}, = {}) req = build_request(:list_bucket_analytics_configurations, params) req.send_request() end |
#list_bucket_inventory_configurations(params = {}) ⇒ Types::ListBucketInventoryConfigurationsOutput
Returns a list of inventory configurations for the bucket.
3147 3148 3149 3150 |
# File 'lib/aws-sdk-s3/client.rb', line 3147 def list_bucket_inventory_configurations(params = {}, = {}) req = build_request(:list_bucket_inventory_configurations, params) req.send_request() end |
#list_bucket_metrics_configurations(params = {}) ⇒ Types::ListBucketMetricsConfigurationsOutput
Lists the metrics configurations for the bucket.
3197 3198 3199 3200 |
# File 'lib/aws-sdk-s3/client.rb', line 3197 def list_bucket_metrics_configurations(params = {}, = {}) req = build_request(:list_bucket_metrics_configurations, params) req.send_request() end |
#list_buckets(params = {}) ⇒ Types::ListBucketsOutput
Returns a list of all buckets owned by the authenticated sender of the request.
3252 3253 3254 3255 |
# File 'lib/aws-sdk-s3/client.rb', line 3252 def list_buckets(params = {}, = {}) req = build_request(:list_buckets, params) req.send_request() end |
#list_multipart_uploads(params = {}) ⇒ Types::ListMultipartUploadsOutput
This operation lists in-progress multipart uploads.
3440 3441 3442 3443 |
# File 'lib/aws-sdk-s3/client.rb', line 3440 def list_multipart_uploads(params = {}, = {}) req = build_request(:list_multipart_uploads, params) req.send_request() end |
#list_object_versions(params = {}) ⇒ Types::ListObjectVersionsOutput
Returns metadata about all of the versions of objects in a bucket.
3579 3580 3581 3582 |
# File 'lib/aws-sdk-s3/client.rb', line 3579 def list_object_versions(params = {}, = {}) req = build_request(:list_object_versions, params) req.send_request() end |
#list_objects(params = {}) ⇒ Types::ListObjectsOutput
Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
3705 3706 3707 3708 |
# File 'lib/aws-sdk-s3/client.rb', line 3705 def list_objects(params = {}, = {}) req = build_request(:list_objects, params) req.send_request() end |
#list_objects_v2(params = {}) ⇒ Types::ListObjectsV2Output
Returns some or all (up to 1000) of the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. Note: ListObjectsV2 is the revised List Objects API and we recommend you use this revised API for new application development.
3844 3845 3846 3847 |
# File 'lib/aws-sdk-s3/client.rb', line 3844 def list_objects_v2(params = {}, = {}) req = build_request(:list_objects_v2, params) req.send_request() end |
#list_parts(params = {}) ⇒ Types::ListPartsOutput
Lists the parts that have been uploaded for a specific multipart upload.
3967 3968 3969 3970 |
# File 'lib/aws-sdk-s3/client.rb', line 3967 def list_parts(params = {}, = {}) req = build_request(:list_parts, params) req.send_request() end |
#put_bucket_accelerate_configuration(params = {}) ⇒ Struct
Sets the accelerate configuration of an existing bucket.
3995 3996 3997 3998 |
# File 'lib/aws-sdk-s3/client.rb', line 3995 def put_bucket_accelerate_configuration(params = {}, = {}) req = build_request(:put_bucket_accelerate_configuration, params) req.send_request() end |
#put_bucket_acl(params = {}) ⇒ Struct
Sets the permissions on a bucket using access control lists (ACL).
4076 4077 4078 4079 |
# File 'lib/aws-sdk-s3/client.rb', line 4076 def put_bucket_acl(params = {}, = {}) req = build_request(:put_bucket_acl, params) req.send_request() end |
#put_bucket_analytics_configuration(params = {}) ⇒ Struct
Sets an analytics configuration for the bucket (specified by the analytics configuration ID).
4138 4139 4140 4141 |
# File 'lib/aws-sdk-s3/client.rb', line 4138 def put_bucket_analytics_configuration(params = {}, = {}) req = build_request(:put_bucket_analytics_configuration, params) req.send_request() end |
#put_bucket_cors(params = {}) ⇒ Struct
Sets the cors configuration for a bucket.
4218 4219 4220 4221 |
# File 'lib/aws-sdk-s3/client.rb', line 4218 def put_bucket_cors(params = {}, = {}) req = build_request(:put_bucket_cors, params) req.send_request() end |
#put_bucket_inventory_configuration(params = {}) ⇒ Struct
Adds an inventory configuration (identified by the inventory ID) from the bucket.
4269 4270 4271 4272 |
# File 'lib/aws-sdk-s3/client.rb', line 4269 def put_bucket_inventory_configuration(params = {}, = {}) req = build_request(:put_bucket_inventory_configuration, params) req.send_request() end |
#put_bucket_lifecycle(params = {}) ⇒ Struct
Deprecated, see the PutBucketLifecycleConfiguration operation.
4324 4325 4326 4327 |
# File 'lib/aws-sdk-s3/client.rb', line 4324 def put_bucket_lifecycle(params = {}, = {}) req = build_request(:put_bucket_lifecycle, params) req.send_request() end |
#put_bucket_lifecycle_configuration(params = {}) ⇒ Struct
Sets lifecycle configuration for your bucket. If a lifecycle configuration exists, it replaces it.
4426 4427 4428 4429 |
# File 'lib/aws-sdk-s3/client.rb', line 4426 def put_bucket_lifecycle_configuration(params = {}, = {}) req = build_request(:put_bucket_lifecycle_configuration, params) req.send_request() end |
#put_bucket_logging(params = {}) ⇒ Struct
Set the logging parameters for a bucket and to specify permissions for who can view and modify the logging parameters. To set the logging status of a bucket, you must be the bucket owner.
4496 4497 4498 4499 |
# File 'lib/aws-sdk-s3/client.rb', line 4496 def put_bucket_logging(params = {}, = {}) req = build_request(:put_bucket_logging, params) req.send_request() end |
#put_bucket_metrics_configuration(params = {}) ⇒ Struct
Sets a metrics configuration (specified by the metrics configuration ID) for the bucket.
4545 4546 4547 4548 |
# File 'lib/aws-sdk-s3/client.rb', line 4545 def put_bucket_metrics_configuration(params = {}, = {}) req = build_request(:put_bucket_metrics_configuration, params) req.send_request() end |
#put_bucket_notification(params = {}) ⇒ Struct
Deprecated, see the PutBucketNotificationConfiguraiton operation.
4592 4593 4594 4595 |
# File 'lib/aws-sdk-s3/client.rb', line 4592 def put_bucket_notification(params = {}, = {}) req = build_request(:put_bucket_notification, params) req.send_request() end |
#put_bucket_notification_configuration(params = {}) ⇒ Struct
Enables notifications of specified events for a bucket.
4689 4690 4691 4692 |
# File 'lib/aws-sdk-s3/client.rb', line 4689 def put_bucket_notification_configuration(params = {}, = {}) req = build_request(:put_bucket_notification_configuration, params) req.send_request() end |
#put_bucket_policy(params = {}) ⇒ Struct
Replaces a policy on a bucket. If the bucket already has a policy, the one in this request completely replaces it.
4728 4729 4730 4731 |
# File 'lib/aws-sdk-s3/client.rb', line 4728 def put_bucket_policy(params = {}, = {}) req = build_request(:put_bucket_policy, params) req.send_request() end |
#put_bucket_replication(params = {}) ⇒ Struct
Creates a new replication configuration (or replaces an existing one, if present).
4793 4794 4795 4796 |
# File 'lib/aws-sdk-s3/client.rb', line 4793 def put_bucket_replication(params = {}, = {}) req = build_request(:put_bucket_replication, params) req.send_request() end |
#put_bucket_request_payment(params = {}) ⇒ Struct
Sets the request payment configuration for a bucket. By default, the bucket owner pays for downloads from the bucket. This configuration parameter enables the bucket owner (only) to specify that the person requesting the download will be charged for the download. Documentation on requester pays buckets can be found at docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html
4839 4840 4841 4842 |
# File 'lib/aws-sdk-s3/client.rb', line 4839 def put_bucket_request_payment(params = {}, = {}) req = build_request(:put_bucket_request_payment, params) req.send_request() end |
#put_bucket_tagging(params = {}) ⇒ Struct
Sets the tags for a bucket.
4894 4895 4896 4897 |
# File 'lib/aws-sdk-s3/client.rb', line 4894 def put_bucket_tagging(params = {}, = {}) req = build_request(:put_bucket_tagging, params) req.send_request() end |
#put_bucket_versioning(params = {}) ⇒ Struct
Sets the versioning state of an existing bucket. To set the versioning state, you must be the bucket owner.
4943 4944 4945 4946 |
# File 'lib/aws-sdk-s3/client.rb', line 4943 def put_bucket_versioning(params = {}, = {}) req = build_request(:put_bucket_versioning, params) req.send_request() end |
#put_bucket_website(params = {}) ⇒ Struct
Set the website configuration for a bucket.
5014 5015 5016 5017 |
# File 'lib/aws-sdk-s3/client.rb', line 5014 def put_bucket_website(params = {}, = {}) req = build_request(:put_bucket_website, params) req.send_request() end |
#put_object(params = {}) ⇒ Types::PutObjectOutput
Adds an object to a bucket.
5312 5313 5314 5315 |
# File 'lib/aws-sdk-s3/client.rb', line 5312 def put_object(params = {}, = {}) req = build_request(:put_object, params) req.send_request() end |
#put_object_acl(params = {}) ⇒ Types::PutObjectAclOutput
uses the acl subresource to set the access control list (ACL) permissions for an object that already exists in a bucket
5422 5423 5424 5425 |
# File 'lib/aws-sdk-s3/client.rb', line 5422 def put_object_acl(params = {}, = {}) req = build_request(:put_object_acl, params) req.send_request() end |
#put_object_tagging(params = {}) ⇒ Types::PutObjectTaggingOutput
Sets the supplied tag-set to an object that already exists in a bucket
5495 5496 5497 5498 |
# File 'lib/aws-sdk-s3/client.rb', line 5495 def put_object_tagging(params = {}, = {}) req = build_request(:put_object_tagging, params) req.send_request() end |
#restore_object(params = {}) ⇒ Types::RestoreObjectOutput
Restores an archived copy of an object back into Amazon S3
5564 5565 5566 5567 |
# File 'lib/aws-sdk-s3/client.rb', line 5564 def restore_object(params = {}, = {}) req = build_request(:restore_object, params) req.send_request() end |
#upload_part(params = {}) ⇒ Types::UploadPartOutput
Uploads a part in a multipart upload.
Note: After you initiate multipart upload and upload one or more parts, you must either complete or abort multipart upload in order to stop getting charged for storage of the uploaded parts. Only after you either complete or abort multipart upload, Amazon S3 frees up the parts storage and stops charging you for the parts storage.
5682 5683 5684 5685 |
# File 'lib/aws-sdk-s3/client.rb', line 5682 def upload_part(params = {}, = {}) req = build_request(:upload_part, params) req.send_request() end |
#upload_part_copy(params = {}) ⇒ Types::UploadPartCopyOutput
Uploads a part by copying data from an existing object as data source.
5853 5854 5855 5856 |
# File 'lib/aws-sdk-s3/client.rb', line 5853 def upload_part_copy(params = {}, = {}) req = build_request(:upload_part_copy, params) req.send_request() end |
#wait_until(waiter_name, params = {}, options = {}) {|w.waiter| ... } ⇒ Boolean
Polls an API operation until a resource enters a desired state.
## Basic Usage
A waiter will call an API operation until:
-
It is successful
-
It enters a terminal state
-
It makes the maximum number of attempts
In between attempts, the waiter will sleep.
# polls in a loop, sleeping between attempts
client.waiter_until(waiter_name, params)
## Configuration
You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You can pass configuration as the final arguments hash.
# poll for ~25 seconds
client.wait_until(waiter_name, params, {
max_attempts: 5,
delay: 5,
})
## Callbacks
You can be notified before each polling attempt and before each delay. If you throw ‘:success` or `:failure` from these callbacks, it will terminate the waiter.
started_at = Time.now
client.wait_until(waiter_name, params, {
# disable max attempts
max_attempts: nil,
# poll for 1 hour, instead of a number of attempts
before_wait: -> (attempts, response) do
throw :failure if Time.now - started_at > 3600
end
})
## Handling Errors
When a waiter is unsuccessful, it will raise an error. All of the failure errors extend from Waiters::Errors::WaiterFailed.
begin
client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
# resource did not enter the desired state in time
end
## Valid Waiters
The following table lists the valid waiter names, the operations they call, and the default ‘:delay` and `:max_attempts` values.
| waiter_name | params | :delay | :max_attempts | | —————– | ————– | ——– | ————- | | bucket_exists | #head_bucket | 5 | 20 | | bucket_not_exists | #head_bucket | 5 | 20 | | object_exists | #head_object | 5 | 20 | | object_not_exists | #head_object | 5 | 20 |
5966 5967 5968 5969 5970 |
# File 'lib/aws-sdk-s3/client.rb', line 5966 def wait_until(waiter_name, params = {}, = {}) w = waiter(waiter_name, ) yield(w.waiter) if block_given? # deprecated w.wait(params) end |
#waiter_names ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5974 5975 5976 |
# File 'lib/aws-sdk-s3/client.rb', line 5974 def waiter_names waiters.keys end |