Class AuthAzureStorage

java.lang.Object
com.chilkatsoft.chilkat2.ChilkatObject
com.chilkatsoft.chilkat2.AuthAzureStorage
All Implemented Interfaces:
AutoCloseable

public class AuthAzureStorage extends ChilkatObject
<section class="authazurestorage-summary">

Authenticate Azure Storage REST requests with account-key Shared Key signing.

Chilkat.AuthAzureStorage is a credential object for Azure Storage Services authentication. It stores the storage account name, Base64 account access key, Azure Storage service type, authentication scheme, and x-ms-version API version used when signing REST requests for Blob, Queue, File, or Table storage.

Azure Storage credentials

Hold the storage account name and Base64 account access key used to sign Azure Storage REST requests.

Shared Key signing

Configure Azure Storage authentication using SharedKey or SharedKeyLite, depending on the service and request style.

Service targeting

Specify the Azure Storage service being accessed, such as Blob, Queue, File, or Table.

API version header

Set the x-ms-version value required by the Azure Storage REST API version being used.

REST integration

Use the configured object with Chilkat.Rest so requests are signed automatically before being sent.

Low-level control

Pair this authentication object with manually constructed REST requests when application code needs direct control over Azure Storage operations.

Common pattern: Create an AuthAzureStorage object, set the storage Account, Base64 AccessKey, Service, Scheme, and XMsVersion, then attach it to a Chilkat.Rest request workflow. Use AuthAzureStorage for Shared Key authorization headers; use Chilkat.AuthAzureSAS when the request should be authorized with a SAS query token instead.

For an extended overview, see AuthAzureStorage Class Overview.

</section>

Instances hold a native Chilkat object: close them with ChilkatObject.close() (try-with-resources) when done; an unclosed instance is freed when it becomes unreachable.

See Also:
Online reference
  • Constructor Details

    • AuthAzureStorage

      public AuthAzureStorage()
      Creates a new AuthAzureStorage object.
  • Method Details

    • getAccessKey

      public String getAccessKey()
      A valid base64 access key for the Azure storage account.
      Returns:
      the value of the AccessKey property
    • setAccessKey

      public void setAccessKey​(String value)
      Sets the AccessKey property; see getAccessKey().
      Parameters:
      value - the new value (not null)
    • getAccount

      public String getAccount()
      The Azure storage account name. (A storage account can contain zero or more containers. A container contains properties, metadata, and zero or more blobs. A blob is any single entity comprised of binary data, properties, and metadata. )
      Returns:
      the value of the Account property
    • setAccount

      public void setAccount​(String value)
      Sets the Account property; see getAccount().
      Parameters:
      value - the new value (not null)
    • getScheme

      public String getScheme()
      Can be SharedKey or SharedKeyLite. The default value is SharedKey.
      Returns:
      the value of the Scheme property
    • setScheme

      public void setScheme​(String value)
      Sets the Scheme property; see getScheme().
      Parameters:
      value - the new value (not null)
    • getService

      public String getService()
      Can be Blob, Queue, File, or Table. The default is Blob.

      Note: Authentication for the Table service did not work in versions prior to v9.5.0.83.

      Returns:
      the value of the Service property
    • setService

      public void setService​(String value)
      Sets the Service property; see getService().
      Parameters:
      value - the new value (not null)
    • getXMsVersion

      public String getXMsVersion()
      If set, automatically adds the x-ms-version HTTP request header to Azure Storage requests. The default value is 2014-02-14.
      Returns:
      the value of the XMsVersion property
    • setXMsVersion

      public void setXMsVersion​(String value)
      Sets the XMsVersion property; see getXMsVersion().
      Parameters:
      value - the new value (not null)