Method: Azure::Blob::BlobService#set_blob_metadata

Defined in:
lib/azure/blob/blob_service.rb

#set_blob_metadata(container, blob, metadata, options = {}) ⇒ Object

Public: Sets metadata headers on the blob.

Attributes

  • container - String. The container name.

  • blob - String. The blob name.

  • metadata - Hash. The custom metadata.

  • options - Hash. Optional parameters.

Options

Accepted key/value pairs in options parameter are:

  • :timeout - Integer. A timeout in seconds.

See msdn.microsoft.com/en-us/library/azure/dd179414.aspx

Returns nil on success.



989
990
991
992
993
994
995
996
997
998
999
1000
# File 'lib/azure/blob/blob_service.rb', line 989

def (container, blob, , options={})
  query = { 'comp' => 'metadata'}
  query['timeout'] = options[:timeout].to_s if options[:timeout]
  uri = blob_uri(container, blob, query)

  headers = service_properties_headers

  (, headers) if 

  call(:put, uri, nil, headers)
  nil
end