Class AWS::S3::ObjectMetadata
In: lib/aws/s3/object_metadata.rb
Parent: Object

Returns an object that represents the metadata for an S3 object.

Methods

[]   []=   method_missing   new   to_h  

Included Modules

Core::Model

Attributes

object  [R]  @return [S3Object]

Public Class methods

@param [S3Object] @param [Hash] options @option options [String] :version_id A specific version of the object

  to get metadata for

Public Instance methods

Returns the value for the given name stored in the S3Object‘s metadata:

  bucket.objects['myobject'].metadata['purpose']
  # returns nil if the given metadata key has not been set

@param [String,Symbol] name The name of the metadata field to

  get.

@return [String,nil] Returns the metadata for the given name.

Changes the value of the given name stored in the S3Object‘s metadata:

  object = bucket.object['myobject']
  object.metadata['purpose'] = 'research'
  object.metadata['purpose']               # => 'research'

@note The name and value of each metadata field must conform

  to US-ASCII.

@param [String,Symbol] name The name of the metadata field to

  set.

@param [String] value The new value of the metadata field.

@return [String,nil] Returns the value that was set.

Proxies the method to {#[]}. @return (see #[])

@return [Hash] Returns the user-generated metadata stored with

  this S3 Object.

[Validate]