Class: Aws::S3::ObjectSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/aws-sdk-resources/services/s3/object_summary.rb

Instance Method Summary collapse

Instance Method Details

#copy_from(source, options = {}) ⇒ Object

Parameters:

  • source (S3::Object, S3::ObjectVersion, S3::ObjectSummary, String, Hash)

    Where to copy object data from. ‘source` must be one of the following:

    • Aws::S3::Object

    • Aws::S3::ObjectSummary

    • Aws::S3::ObjectVersion

    • Hash - with ‘:bucket` and `:key` and optional `:version_id`

    • String - formatted like ‘“source-bucket-name/uri-escaped-key”` or `“source-bucket-name/uri-escaped-key?versionId=version-id”`

  • options (Hash) (defaults to: {})

    a customizable set of options

See Also:



11
12
13
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 11

def copy_from(source, options = {})
  object.copy_from(source, options)
end

#copy_to(target, options = {}) ⇒ Object

Parameters:

  • target (S3::Object, String, Hash)

    Where to copy the object data to. ‘target` must be one of the following:

    • Aws::S3::Object

    • Hash - with ‘:bucket` and `:key`

    • String - formatted like ‘“target-bucket-name/target-key”`

See Also:



19
20
21
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 19

def copy_to(target, options = {})
  object.copy_to(target, options)
end

#move_to(target, options = {}) ⇒ void

This method returns an undefined value.

Parameters:

  • target (S3::Object, String, Hash)

    Where to copy the object data to. ‘target` must be one of the following:

    • Aws::S3::Object

    • Hash - with ‘:bucket` and `:key`

    • String - formatted like ‘“target-bucket-name/target-key”`

See Also:



27
28
29
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 27

def move_to(target, options = {})
  object.move_to(target, options)
end

#presigned_post(options = {}) ⇒ PresignedPost



35
36
37
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 35

def presigned_post(options = {})
  object.presigned_post(options)
end

#presigned_url(http_method, params = {}) ⇒ String

Parameters:

  • http_method (Symbol)

    The HTTP method to generate a presigned URL for. Valid values are ‘:get`, `:put`, `:head`, and `:delete`.

  • params (Hash) (defaults to: {})

    Additional request parameters to use when generating the pre-signed URL. See the related documentation in Client for accepted params.

    | HTTP Method | Client Method | |—————|————————| | ‘:get` | Client#get_object | | `:put` | Client#put_object | | `:head` | Client#head_object | | `:delete` | Client#delete_object |

Returns:

  • (String)

See Also:



43
44
45
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 43

def presigned_url(http_method, params = {})
  object.presigned_url(http_method, params)
end

#public_url(options = {}) ⇒ String

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Returns:

  • (String)

See Also:



51
52
53
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 51

def public_url(options = {})
  object.public_url(options)
end

#upload_file(source, options = {}) ⇒ Boolean

Returns ‘true` when the object is uploaded without any errors.

Parameters:

  • source (String, Pathname, File, Tempfile)

    A file or path to a file on the local file system that should be uploaded to this object. If you pass an open file object, then it is your responsibility to close the file object once the upload completes.

  • options (Hash) (defaults to: {})

    a customizable set of options

Returns:

  • (Boolean)

    Returns ‘true` when the object is uploaded without any errors.

See Also:



59
60
61
# File 'lib/aws-sdk-resources/services/s3/object_summary.rb', line 59

def upload_file(source, options = {})
  object.upload_file(source, options)
end