Create an object in an S3 bucket
@param bucket_name [String] Name of bucket to create object in @param object_name [String] Name of object to create @param data [File||String] File or String to create object from @param options [Hash] @option options Cache-Control [String] Caching behaviour @option options Content-Disposition [String] Presentational information for the object @option options Content-Encoding [String] Encoding of object data @option options Content-Length [String] Size of object in bytes (defaults to object.read.length) @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message @option options Content-Type [String] Standard MIME type describing contents (defaults to MIME::Types.of.first) @option options Expires [String] Cache expiry @option options x-amz-acl [String] Permissions, must be in [‘private’, ‘public-read’, ‘public-read-write’, ‘authenticated-read’] @option options x-amz-storage-class [String] Default is ‘STANDARD’, set to ‘REDUCED_REDUNDANCY’ for non-critical, reproducable data @option options x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB. Each name, value pair must conform to US-ASCII. @option options encryption [String] Sets HTTP header for server-side encryption. Set to ‘AES256’ for SSE-S3 and SSE-C. Set to ‘aws:kms’ for SSE-KMS @option options encryption_key [String] Encryption customer key for SSE-C @option options x-amz-server-side-encryption-aws-kms-key-id [String] KMS key ID of the encryption key for SSE-KMS @option options x-amz-server-side-encryption-context [String] Encryption context for SSE-KMS
@return [Excon::Response] response:
* headers [Hash]:
* ETag [String] etag of new object
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUT.html
Initialize connection to S3
options parameter must include values for :aws_access_key_id and :aws_secret_access_key in order to create a connection
s3 = Fog::Storage.new(
:provider => "AWS",
:aws_access_key_id => your_aws_access_key_id,
:aws_secret_access_key => your_aws_secret_access_key
)
Abort a multipart upload
@param [String] bucket_name Name of bucket to abort multipart upload on @param [String] object_name Name of object to abort multipart upload on @param [String] upload_id Id of upload to add part to
@see docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadAbort.html
Complete a multipart upload
@param [String] bucket_name Name of bucket to complete multipart upload for @param [String] object_name Name of object to complete multipart upload for @param [String] upload_id Id of upload to add part to @param [Array<String>] parts Array of etags as Strings for parts
@return [Excon::Response]
* body [Hash]: (success)
* Bucket [String] - bucket of new object
* ETag [String] - etag of new object
* Key [String] - key of new object
* Location [String] - location of new object
* body [Hash]: (failure)
* Code [String] - Error status code
* Message [String] - Error description
@note This request could fail and still return +200 OK+, so it‘s important that you check the response. @see docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadComplete.html
Copy an object from one S3 bucket to another
@param source_bucket_name [String] Name of source bucket @param source_object_name [String] Name of source object @param target_bucket_name [String] Name of bucket to create copy in @param target_object_name [String] Name for new copy of object
@param options [Hash]: @option options [String] x-amz-metadata-directive Specifies whether to copy metadata from source or replace with data in request. Must be in [‘COPY’, ‘REPLACE’] @option options [String] x-amz-copy_source-if-match Copies object if its etag matches this value @option options [Time] x-amz-copy_source-if-modified_since Copies object it it has been modified since this time @option options [String] x-amz-copy_source-if-none-match Copies object if its etag does not match this value @option options [Time] x-amz-copy_source-if-unmodified-since Copies object it it has not been modified since this time @option options [String] x-amz-storage-class Default is ‘STANDARD’, set to ‘REDUCED_REDUNDANCY’ for non-critical, reproducable data
@return [Excon::Response]
* body [Hash]:
* ETag [String] - etag of new object
* LastModified [Time] - date object was last modified
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectCOPY.html
Delete an S3 bucket
@param bucket_name [String] name of bucket to delete
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETE.html
Deletes the cors configuration information set for the bucket.
@param bucket_name [String] name of bucket to delete cors rules from
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEcors.html
Delete lifecycle configuration for a bucket
@param bucket_name [String] name of bucket to delete lifecycle configuration from
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETElifecycle.html
Delete policy for a bucket
@param bucket_name [String] name of bucket to delete policy from
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEpolicy.html
Delete tagging for a bucket
@param bucket_name [String] name of bucket to delete tagging from
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketDELETEtagging.html
Delete website configuration for a bucket
@param bucket_name [String] name of bucket to delete website configuration from
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketDELETEwebsite.html
Delete multiple objects from S3 @note For versioned deletes, options should include a version_ids hash, which
maps from filename to an array of versions.
The semantics are that for each (object_name, version) tuple, the
caller must insert the object_name and an associated version (if
desired), so for n versions, the object must be inserted n times.
@param bucket_name [String] Name of bucket containing object to delete @param object_names [Array] Array of object names to delete
@return [Excon::Response] response:
* body [Hash]:
* DeleteResult [Array]:
* Deleted [Hash]:
* Key [String] - Name of the object that was deleted
* VersionId [String] - ID for the versioned onject in case of a versioned delete
* DeleteMarker [Boolean] - Indicates if the request accessed a delete marker
* DeleteMarkerVersionId [String] - Version ID of the delete marker accessed
* Error [Hash]:
* Key [String] - Name of the object that failed to be deleted
* VersionId [String] - ID of the versioned object that was attempted to be deleted
* Code [String] - Status code for the result of the failed delete
* Message [String] - Error description
@see docs.amazonwebservices.com/AmazonS3/latest/API/multiobjectdeleteapi.html
Delete an object from S3
@param bucket_name [String] Name of bucket containing object to delete @param object_name [String] Name of object to delete
@return [Excon::Response] response:
* status [Integer] - 204
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
List information about objects in an S3 bucket
@param bucket_name [String] name of bucket to list object keys from @param options [Hash] config arguments for list. Defaults to {}. @option options delimiter [String] causes keys with the same string between the prefix
value and the first occurence of delimiter to be rolled up
@option options marker [String] limits object keys to only those that appear
lexicographically after its value.
@option options max-keys [Integer] limits number of object keys returned @option options prefix [String] limits object keys to those beginning with its value.
@return [Excon::Response] response:
* body [Hash]:
* Delimeter [String] - Delimiter specified for query
* IsTruncated [Boolean] - Whether or not the listing is truncated
* Marker [String]- Marker specified for query
* MaxKeys [Integer] - Maximum number of keys specified for query
* Name [String] - Name of the bucket
* Prefix [String] - Prefix specified for query
* CommonPrefixes [Array] - Array of strings for common prefixes
* Contents [Array]:
* ETag [String] - Etag of object
* Key [String] - Name of object
* LastModified [String] - Timestamp of last modification of object
* Owner [Hash]:
* DisplayName [String] - Display name of object owner
* ID [String] - Id of object owner
* Size [Integer] - Size of object
* StorageClass [String] - Storage class of object
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGET.html
Get access control list for an S3 bucket
@param bucket_name [String] name of bucket to get access control list for
@return [Excon::Response] response:
* body [Hash]:
* AccessControlPolicy [Hash]:
* Owner [Hash]:
* DisplayName [String] - Display name of object owner
* ID [String] - Id of object owner
* AccessControlList [Array]:
* Grant [Hash]:
* Grantee [Hash]:
* DisplayName [String] - Display name of grantee
* ID [String] - Id of grantee
or
* URI [String] - URI of group to grant access for
* Permission [String] - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETacl.html
Gets the CORS configuration for an S3 bucket
@param bucket_name [String] name of bucket to get access control list for
@return [Excon::Response] response:
* body [Hash]:
* CORSConfiguration [Array]:
* CORSRule [Hash]:
* AllowedHeader [String] - Which headers are allowed in a pre-flight OPTIONS request through the Access-Control-Request-Headers header.
* AllowedMethod [String] - Identifies an HTTP method that the domain/origin specified in the rule is allowed to execute.
* AllowedOrigin [String] - One or more response headers that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
* ExposeHeader [String] - One or more headers in the response that you want customers to be able to access from their applications (for example, from a JavaScript XMLHttpRequest object).
* ID [String] - An optional unique identifier for the rule. The ID value can be up to 255 characters long. The IDs help you find a rule in the configuration.
* MaxAgeSeconds [Integer] - The time in seconds that your browser is to cache the preflight response for the specified resource.
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETcors.html
Get bucket lifecycle configuration
@param bucket_name [String] name of bucket to get lifecycle configuration for
@return [Excon::Response] response:
* body [Hash]:
* Rules - object expire rules [Array]:
* ID [String] - Unique identifier for the rule
* Prefix [String] - Prefix identifying one or more objects to which the rule applies
* Enabled [Boolean] - if rule is currently being applied
* Days [Integer] - lifetime, in days, of the objects that are subject to the rule
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlifecycle.html
Get location constraint for an S3 bucket
@param bucket_name [String] name of bucket to get location constraint for
@return [Excon::Response] response:
* body [Hash]:
* LocationConstraint [String] - Location constraint of the bucket
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlocation.html
Get logging status for an S3 bucket
@param bucket_name [String] name of bucket to get logging status for
@return [Excon::Response] response:
* body [Hash]:
* BucketLoggingStatus (will be empty if logging is disabled) [Hash]:
* LoggingEnabled [Hash]:
* TargetBucket [String] - bucket where logs are stored
* TargetPrefix [String] - prefix logs are stored with
* TargetGrants [Array]:
* Grant [Hash]:
* Grantee [Hash]:
* DisplayName [String] - Display name of grantee
* ID [String] - Id of grantee
or
* URI [String] - URI of group to grant access for
* Permission [String] - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETlogging.html
Get bucket notification configuration
@param bucket_name [String] name of bucket to get notification configuration for
@return [Excon::Response] response:
* body [Hash]:
* Topics [Array] SNS topic configurations for the notification
* ID [String] Unique identifier for the configuration
* Topic [String] Amazon SNS topic ARN to which Amazon S3 will publish a message when it detects events of specified type
* Event [String] Bucket event for which to send notifications
* Queues [Array] SQS queue configurations for the notification
* ID [String] Unique identifier for the configuration
* Queue [String] Amazon SQS queue ARN to which Amazon S3 will publish a message when it detects events of specified type
* Event [String] Bucket event for which to send notifications
* CloudFunctions [Array] AWS Lambda notification configurations
* ID [String] Unique identifier for the configuration
* CloudFunction [String] Lambda cloud function ARN that Amazon S3 can invoke when it detects events of the specified type
* InvocationRole [String] IAM role ARN that Amazon S3 can assume to invoke the specified cloud function on your behalf
* Event [String] Bucket event for which to send notifications
@see docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETnotification.html
List information about object versions in an S3 bucket
@param bucket_name [String] name of bucket to list object keys from @param options [Hash] config arguments for list @option options delimiter [String] causes keys with the same string between the prefix value and the first occurence of delimiter to be rolled up @option options key-marker [String] limits object keys to only those that appear lexicographically after its value. @option options max-keys [Integer] limits number of object keys returned @option options prefix [String] limits object keys to those beginning with its value. @option options version-id-marker [String] limits object versions to only those that appear lexicographically after its value
@return [Excon::Response] response:
* body [Hash]:
* Delimeter [String] - Delimiter specified for query
* KeyMarker [String] - Key marker specified for query
* MaxKeys [Integer] - Maximum number of keys specified for query
* Name [String] - Name of the bucket
* Prefix [String] - Prefix specified for query
* VersionIdMarker [String] - Version id marker specified for query
* IsTruncated [Boolean] - Whether or not this is the totality of the bucket
* Versions [Array]:
* DeleteMarker [Hash]:
* IsLatest [Boolean] - Whether or not this is the latest version
* Key [String] - Name of object
* LastModified [String]: Timestamp of last modification of object
* Owner [Hash]:
* DisplayName [String] - Display name of object owner
* ID [String] - Id of object owner
* VersionId [String] - The id of this version
or
* Version [Hash]:
* ETag [String]: Etag of object
* IsLatest [Boolean] - Whether or not this is the latest version
* Key [String] - Name of object
* LastModified [String]: Timestamp of last modification of object
* Owner [Hash]:
* DisplayName [String] - Display name of object owner
* ID [String] - Id of object owner
* Size [Integer] - Size of object
* StorageClass [String] - Storage class of object
* VersionId [String] - The id of this version
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETVersion.html
Get bucket policy for an S3 bucket
@param bucket_name [String] name of bucket to get policy for
@return [Excon::Response] response:
* body [Hash] - policy document
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETpolicy.html
Get tags for an S3 bucket
@param bucket_name [String] name of bucket to get tags for
@return [Excon::Response] response:
* body [Hash]:
* BucketTagging [Hash]:
* Key [String] - tag key
* Value [String] - tag value
@see docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETtagging.html
Get versioning status for an S3 bucket
@param bucket_name [String] name of bucket to get versioning status for
@return [Excon::Response] response:
* body [Hash]:
* VersioningConfiguration [Hash]:
* Status [String] - Versioning status in ['Enabled', 'Suspended', nil]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETversioningStatus.html
Get website configuration for an S3 bucket
@param bucket_name [String] name of bucket to get website configuration for
@return [Excon::Response] response:
* body [Hash]:
* IndexDocument [Hash]:
* Suffix [String] - Suffix appended when directory is requested
* ErrorDocument [Hash]:
* Key [String] - Object key to return for 4XX class errors
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketGETwebsite.html
Get an object from S3
@param bucket_name [String] Name of bucket to read from @param object_name [String] Name of object to read @param options [Hash] @option options If-Match [String] Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed). @option options If-Modified-Since [Time] Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified). @option options If-None-Match [String] Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified) @option options If-Unmodified-Since [Time] Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed). @option options Range [String] Range of object to download @option options versionId [String] specify a particular version to retrieve @option options query[Hash] specify additional query string
@return [Excon::Response] response:
* body [String]- Contents of object
* headers [Hash]:
* Content-Length [String] - Size of object contents
* Content-Type [String] - MIME type of object
* ETag [String] - Etag of object
* Last-Modified [String] - Last modified timestamp for object
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGET.html
Get access control list for an S3 object
@param bucket_name [String] name of bucket containing object @param object_name [String] name of object to get access control list for @param options [Hash] @option options versionId [String] specify a particular version to retrieve
@return [Excon::Response] response:
* body [Hash]:
* [AccessControlPolicy [Hash]:
* Owner [Hash]:
* DisplayName [String] - Display name of object owner
* ID [String] - Id of object owner
* AccessControlList [Array]:
* Grant [Hash]:
* Grantee [Hash]:
* DisplayName [String] - Display name of grantee
* ID [String] - Id of grantee
or
* URI [String] - URI of group to grant access for
* Permission [String] - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETacl.html
Get torrent for an S3 object
@param bucket_name [String] name of bucket containing object @param object_name [String] name of object to get torrent for
@return [Excon::Response] response:
* body [Hash]:
* AccessControlPolicy [Hash:
* Owner [Hash]:
* DisplayName [String] - Display name of object owner
* ID [String] - Id of object owner
* AccessControlList [Array]:
* Grant [Hash]:
* Grantee [Hash]:
* DisplayName [String] - Display name of grantee
* ID [String] - Id of grantee
* Permission [String] - Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectGETtorrent.html
Get configured payer for an S3 bucket
@param bucket_name [String] name of bucket to get payer for
@return [Excon::Response] response:
* body [Hash]:
* Payer [String] - Specifies who pays for download and requests
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentGET.html
List information about S3 buckets for authorized user
@return [Excon::Response] response:
* body [Hash]:
* Buckets [Hash]:
* Name [String] - Name of bucket
* CreationTime [Time] - Timestamp of bucket creation
* Owner [Hash]:
* DisplayName [String] - Display name of bucket owner
* ID [String] - Id of bucket owner
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTServiceGET.html
Get headers for an S3 bucket, used to verify if it exists and if you have permission to access it
@param bucket_name [String] Name of bucket to read from
@return [Excon::Response] 200 response implies it exists, 404 does not exist, 403 no permissions
* body [String] Empty
* headers [Hash]:
* Content-Type [String] - MIME type of object
@see docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketHEAD.html
Get headers for an object from S3
@param bucket_name [String] Name of bucket to read from @param object_name [String] Name of object to read @param options [Hash]: @option options [String] If-Match Returns object only if its etag matches this value, otherwise returns 412 (Precondition Failed). @option options [Time] If-Modified-Since Returns object only if it has been modified since this time, otherwise returns 304 (Not Modified). @option options [String] If-None-Match Returns object only if its etag differs from this value, otherwise returns 304 (Not Modified) @option options [Time] If-Unmodified-Since Returns object only if it has not been modified since this time, otherwise returns 412 (Precodition Failed). @option options [String] Range Range of object to download @option options [String] versionId specify a particular version to retrieve
@return [Excon::Response] response:
* body [String] Contents of object
* headers [Hash]:
* Content-Length [String] - Size of object contents
* Content-Type [String] - MIME type of object
* ETag [String] - Etag of object
* Last-Modified - [String] Last modified timestamp for object
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectHEAD.html
Initiate a multipart upload to an S3 bucket
@param bucket_name [String] Name of bucket to create object in @param object_name [String] Name of object to create @param options [Hash]: @option options [String] Cache-Control Caching behaviour @option options [String] Content-Disposition Presentational information for the object @option options [String] Content-Encoding Encoding of object data @option options [String] Content-MD5 Base64 encoded 128-bit MD5 digest of message (defaults to Base64 encoded MD5 of object.read) @option options [String] Content-Type Standard MIME type describing contents (defaults to MIME::Types.of.first) @option options [String] x-amz-acl Permissions, must be in [‘private’, ‘public-read’, ‘public-read-write’, ‘authenticated-read’] @option options [String] x-amz-meta-#{name} Headers to be returned with object, note total size of request without body must be less than 8 KB.
@return [Excon::Response] response:
* body [Hash]:
* Bucket [String] - Bucket where upload was initiated
* Key [String] - Object key where the upload was initiated
* UploadId [String] - Id for initiated multipart upload
@see docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadInitiate.html
List multipart uploads for a bucket
@param [String] bucket_name Name of bucket to list multipart uploads for @param [Hash] options config arguments for list. Defaults to {}. @option options [String] key-marker limits parts to only those that appear lexicographically after this key. @option options [Integer] max-uploads limits number of uploads returned @option options [String] upload-id-marker limits uploads to only those that appear lexicographically after this upload id.
@return [Excon::Response] response:
* body [Hash]:
* Bucket [String] Bucket where the multipart upload was initiated
* IsTruncated [Boolean] Whether or not the listing is truncated
* KeyMarker [String] first key in list, only upload ids after this lexographically will appear
* MaxUploads [Integer] Maximum results to return
* NextKeyMarker [String] last key in list, for further pagination
* NextUploadIdMarker [String] last key in list, for further pagination
* Upload [Hash]:
* Initiated [Time] Time when upload was initiated
* Initiator [Hash]:
* DisplayName [String] Display name of upload initiator
* ID [String] Id of upload initiator
* Key [String] Key where multipart upload was initiated
* Owner [Hash]:
* DisplayName [String] Display name of upload owner
* ID [String] Id of upload owner
* StorageClass [String] Storage class of object
* UploadId [String] upload id of upload containing part
* UploadIdMarker [String] first key in list, only upload ids after this lexographically will appear
@see docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadListMPUpload.html
List parts for a multipart upload
@param bucket_name [String] Name of bucket to list parts for @param object_name [String] Name of object to list parts for @param upload_id [String] upload id to list objects for @param options [Hash] config arguments for list. Defaults to {}. @option options max-parts [Integer] limits number of parts returned @option options part-number-marker [String] limits parts to only those that appear lexicographically after this part number.
@return [Excon::Response] response:
* body [Hash]:
* Bucket [string] Bucket where the multipart upload was initiated
* Initiator [Hash]:
* DisplayName [String] Display name of upload initiator
* ID [String] Id of upload initiator
* IsTruncated [Boolean] Whether or not the listing is truncated
* Key [String] Key where multipart upload was initiated
* MaxParts [String] maximum number of replies alllowed in response
* NextPartNumberMarker [String] last item in list, for further pagination
* Part [Array]:
* ETag [String] ETag of part
* LastModified [Timestamp] Last modified for part
* PartNumber [String] Part number for part
* Size [Integer] Size of part
* PartNumberMarker [String] Part number after which listing begins
* StorageClass [String] Storage class of object
* UploadId [String] upload id of upload containing part
@see docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadListParts.html
Restore an object from Glacier to its original S3 path
@param bucket_name [String] Name of bucket containing object @param object_name [String] Name of object to restore @option days [Integer] Number of days to restore object for. Defaults to 100000 (a very long time)
@return [Excon::Response] response:
* status [Integer] 200 (OK) Object is previously restored * status [Integer] 202 (Accepted) Object is not previously restored * status [Integer] 409 (Conflict) Restore is already in progress
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPOSTrestore.html
Create an S3 bucket
@param bucket_name [String] name of bucket to create @option options [Hash] config arguments for bucket. Defaults to {}. @option options LocationConstraint [Symbol] sets the location for the bucket @option options x-amz-acl [String] Permissions, must be in [‘private’, ‘public-read’, ‘public-read-write’, ‘authenticated-read’]
@return [Excon::Response] response:
* status [Integer] 200
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUT.html
Change access control list for an S3 bucket
@param bucket_name [String] name of bucket to modify @param acl [Hash]
* Owner [Hash]:
* ID [String]: id of owner
* DisplayName [String]: display name of owner
* AccessControlList [Array]:
* Grantee [Hash]:
* DisplayName [String] Display name of grantee
* ID [String] Id of grantee
or
* EmailAddress [String] Email address of grantee
or
* URI [String] URI of group to grant access for
* Permission [String] Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTacl.html
Sets the cors configuration for your bucket. If the configuration exists, Amazon S3 replaces it.
@param bucket_name [String] name of bucket to modify @param cors [Hash]
* CORSConfiguration [Array]:
* ID [String]: A unique identifier for the rule.
* AllowedMethod [String]: An HTTP method that you want to allow the origin to execute.
* AllowedOrigin [String]: An origin that you want to allow cross-domain requests from.
* AllowedHeader [String]: Specifies which headers are allowed in a pre-flight OPTIONS request via the Access-Control-Request-Headers header.
* MaxAgeSeconds [String]: The time in seconds that your browser is to cache the preflight response for the specified resource.
* ExposeHeader [String]: One or more headers in the response that you want customers to be able to access from their applications.
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTcors.html
Change lifecycle configuration for an S3 bucket
@param bucket_name [String] name of bucket to set lifecycle configuration for
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html
Change logging status for an S3 bucket
@param bucket_name [String] name of bucket to modify @param logging_status [Hash]:
* LoggingEnabled [Hash]: logging options or {} to disable
* Owner [Hash]:
* ID [String]: id of owner
* DisplayName [String]: display name of owner
* AccessControlList [Array]:
* Grantee [Hash]:
* DisplayName [String] Display name of grantee
* ID [String] Id of grantee
or
* EmailAddress [String] Email address of grantee
or
* URI [String] URI of group to grant access for
* Permission [String] Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTlogging.html
Change notification configuration for an S3 bucket
@param bucket_name [String] name of bucket to set notification configuration for
@see docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTnotification.html
Change bucket policy for an S3 bucket
@param bucket_name [String] name of bucket to modify @param policy [Hash] policy document
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTpolicy.html
Change tag set for an S3 bucket
@param bucket_name [String] name of bucket to modify @param tags [Hash]:
* Key [String]: tag key * Value [String]: tag value
@see docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTtagging.html
Change versioning status for an S3 bucket
@param bucket_name [String] name of bucket to modify @param status [String] Status to change to in [‘Enabled’, ‘Suspended’]
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html
Change website configuration for an S3 bucket
@param bucket_name [String] name of bucket to modify @param options [Hash] @option options RedirectAllRequestsTo [String] Host name to redirect all requests to - if this is set, other options are ignored @option options IndexDocument [String] suffix to append to requests for the bucket @option options ErrorDocument [String] key to use for 4XX class errors
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTBucketPUTwebsite.html
Change access control list for an S3 object
@param [String] bucket_name name of bucket to modify @param [String] object_name name of object to get access control list for @param [Hash] acl
* Owner [Hash]
* ID [String] id of owner
* DisplayName [String] display name of owner
* AccessControlList [Array]
* Grantee [Hash]
* DisplayName [String] Display name of grantee
* ID [String] Id of grantee
or
* EmailAddress [String] Email address of grantee
or
* URI [String] URI of group to grant access for
* Permission [String] Permission, in [FULL_CONTROL, WRITE, WRITE_ACP, READ, READ_ACP]
@param [String] acl Permissions, must be in [‘private’, ‘public-read’, ‘public-read-write’, ‘authenticated-read’] @param [Hash] options @option options [String] versionId specify a particular version to retrieve
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectPUTacl.html
Change who pays for requests to an S3 bucket
@param bucket_name [String] name of bucket to modify @param payer [String] valid values are BucketOwner or Requester
@see docs.amazonwebservices.com/AmazonS3/latest/API/RESTrequestPaymentPUT.html
Upload a part for a multipart upload
@param bucket_name [String] Name of bucket to add part to @param object_name [String] Name of object to add part to @param upload_id [String] Id of upload to add part to @param part_number [String] Index of part in upload @param data [File||String] Content for part @param options [Hash] @option options Content-MD5 [String] Base64 encoded 128-bit MD5 digest of message
@return [Excon::Response] response
* headers [Hash]:
* ETag [String] etag of new object (will be needed to complete upload)
@see docs.amazonwebservices.com/AmazonS3/latest/API/mpUploadUploadPart.html