Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. LIST BLOB
    1. The LIST BLOB operation displays the list of blobs in the container. 

  2. GET BLOB
    1. The GET BLOB operation is used to get the content in a blob. 

  3. PUT BLOB
    1. The PUT BLOB operation is used to create a blob and adding a content to it or writing to a blob.

...

  1. LIST BLOB:
    In the LIST BLOB operation lists the blobs in the container. The StringToSign for LIST BLOB will be: 

    Code Block
    titleStringToSign for LIST BLOB operation
    collapsetrue
    $stringToSign  =     "GET" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + (($ContentLength -gt -1) ? $ContentLength : '') + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "x-ms-blob-type:BlockBlob" + "`n" `
                         + "x-ms-date:$(Get-Date (Get-Date $Now).ToUniversalTime() -Format 'R')" + "`n" `
                         + "x-ms-version:$Version" + "`n" `
                         + "/$Account/$Container" + "`n" `
                         + "comp:list" + "`n" `
                         + "restype:container"

    where $Account is the account by which request is generated. $Container is the name of the container.

  2. GET BLOB:
    The GTE BLOB operation displays the content of the blob. So, for the get operation it is required to pass the blob name whose content is to be read/get. So, the StringToSign for GET BLOB will be:

    Code Block
    titleStringToSign for GET BLOB operation
    collapsetrue
    $stringToSign  =     'GET' `
    					 + "`n" `
                         + "`n" `
                         + "`n" `
                         + (($ContentLength -gt -1) ? $ContentLength : '') + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "x-ms-blob-type:BlockBlob" + "`n" `
                         + "x-ms-date:$(Get-Date (Get-Date $Now).ToUniversalTime() -Format 'R')" + "`n" `
                         + "x-ms-version:$Version" + "`n" `
                         + "/$Account/$Container/$Blob"

    where $Account is the account by which request is generated. $Container is the name of the container. $Blob is the name of the blob whose content is to be Get.

  3. PUT BLOB
    The PUT BLOB operation creates a new block or updates an existing block blob. The PUT BLOB creates a BLOB of a length of content in a file so it is required to pass the length of the blob so that it can allocate a that much memory in the Container and can write the file content to the blob. The StringToSign for the PUT BLOB will be:

    Code Block
    titleStringToSign for PUT BLOB operation
    collapsetrue
    $stringToSign  = 	 'PUT' `
    				     + "`n" `
                         + "`n" `
                         + "`n" `
                         + (($ContentLength -gt -1) ? $ContentLength : '') + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "`n" `
                         + "x-ms-blob-type:BlockBlob" + "`n" `
                         + "x-ms-date:$(Get-Date (Get-Date $Now).ToUniversalTime() -Format 'R')" + "`n" `
                         + "x-ms-version:$Version" + "`n" `
                         + "/$Account/$Container/$Blob"

    where $Account is the account by which request is generated. $Container is the name of the container. $Blob is the name of the blob which is to be created. The $ContentLength for the LIST BLOB and GET BLOB operation will be empty but for the PUT BLOB it required to pass the Content Length for the file to be created.

...