lib/azure/armrest/model/storage_account.rb
# Create a read-only snapshot of a blob.
#
# Possible options are:
#
# * meta_name
# * lease_id
# * client_request_id
# * if_modified_since
# * if_unmodified_since
# * if_match
# * if_none_match
# * timeout
#
# Returns a ResponseHeaders object since this is an asynchronous method.
#
Create a read-only snapshot of a blob.
Possible options are.



Returns a ResponseHeaders object since this is an asynchronous method.
Create a read - only snapshot of a blob . Possible options are . Returns a ResponseHeaders object since this is an asynchronous method .
def create_blob_snapshot(container, blob, key = access_key, options = {})
        raise ArgumentError, "No access key specified" unless key
        timeout = options.delete(:timeout) 
        url = File.join(properties.primary_endpoints.blob, container, blob) + "?comp=snapshot"
        url += "&timeout=#{timeout}" if timeout
        hash = options.transform_keys do |okey|
          if okey.to_s =~ /^if/i
            okey.to_s.tr('_', '-')
          else
            'x-ms-blob-' + okey.to_s.tr('_', '-')
          end
        end
        hash['verb'] = 'PUT'
        headers = build_headers(url, key, :blob, hash)
        response = ArmrestService.send(
          :rest_put,
          :url         => url,
          :payload     => '',
          :headers     => headers,
          :proxy       => configuration.proxy,
          :ssl_version => configuration.ssl_version,
          :ssl_verify  => configuration.ssl_verify,
          :timeout     => configuration.timeout
        )
        headers = Azure::Armrest::ResponseHeaders.new(response.headers)
        headers.response_code = response.code
        headers
      end
def create_blob_snapshot ( container , blob , key = access_key , options = { } ) raise ArgumentError , "No access key specified" unless key timeout = options . delete ( :timeout ) url = File . join ( properties . primary_endpoints . blob , container , blob ) + "?comp=snapshot" url += "&timeout=#{timeout}" if timeout hash = options . transform_keys do | okey | if okey . to_s =~ / ^if /i okey . to_s . tr ( '_' , '-' ) else 'x-ms-blob-' + okey . to_s . tr ( '_' , '-' ) end end hash [ 'verb' ] = 'PUT' headers = build_headers ( url , key , :blob , hash ) response = ArmrestService . send ( :rest_put , :url => url , :payload => '' , :headers => headers , :proxy => configuration . proxy , :ssl_version => configuration . ssl_version , :ssl_verify => configuration . ssl_verify , :timeout => configuration . timeout ) headers = Azure :: Armrest :: ResponseHeaders . new ( response . headers ) headers . response_code = response . code headers end
Create a read-only snapshot of a blob.
Create a read - only snapshot of a blob .
# Part of request
container
<not_specific>
blob
<not_specific>
key
<not_specific>
access_key
<not_specific>
options
<not_specific>