Class | AWS::S3::ObjectMetadata |
In: |
lib/aws/s3/object_metadata.rb
|
Parent: | Object |
Returns an object that represents the metadata for an S3 object.
object | [R] | @return [S3Object] |
@param [S3Object] object @param [Hash] options @option options [String] :version_id A specific version of the object
to get metadata for
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.