Class: StorageServiceClient

StorageServiceClient

The StorageServiceClient class is the base class of all the service classes.


new StorageServiceClient(storageAccount, storageAccessKey, host, usePathStyleUri, sas [, token])

Creates a new StorageServiceClient object.

Parameters:
Name Type Argument Description
storageAccount string

The storage account.

storageAccessKey string

The storage access key.

host object

The host for the service.

usePathStyleUri bool

Boolean value indicating wether to use path style uris.

sas string

The Shared Access Signature string.

token TokenCredential <optional>

The TokenCredential object, which can be created with an OAuth access token string.

Source:

Members


logger :Logger

The logger of the service. To change the log level of the services, set the logger.level.

Type:
Source:

Methods


<static> getStorageSettings( [storageAccountOrConnectionString] [, storageAccessKey] [, host] [, sas] [, token])

Gets the storage settings.

Parameters:
Name Type Argument Description
storageAccountOrConnectionString string <optional>

The storage account or the connection string.

storageAccessKey string <optional>

The storage access key.

host string <optional>

The host address.

sas object <optional>

The Shared Access Signature string.

token TokenCredential <optional>

The TokenCredential object.

Source:
Returns:
Type
StorageServiceSettings

_getUrl()

Get the url of a given path

Source:

_initializeLocation()

Initializes the location to which the operation is being sent to.

Source:

_invalidLocationMode()

Checks whether we have the relevant host information based on the locationMode.

Source:

_maximumExecutionTimeExceeded()

Checks to see if the maximum execution timeout provided has been exceeded.

Source:

_setDefaultProxy()

Sets the service host default proxy from the environment.
Can be overridden by calling _setProxyUrl or _setProxy

Source:

_setOperationExpiryTime()

Sets the operation expiry time.

Source:

_validateLocation()

Validates the location to which the operation is being sent to.

Source:

setAccountServiceProperties(serviceProperties [, options], callback)

Sets the properties of a storage account’s service, including Azure Storage Analytics.
You can also use this operation to set the default request version for all incoming requests that do not have a version specified.

This:
Parameters:
Name Type Argument Description
serviceProperties object

The service properties.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

clientRequestTimeoutInMs int <optional>

The timeout of client requests, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request.
The maximum execution time interval begins at the time that the client begins building the request. The maximum
execution time is checked intermittently while performing requests, and before executing retries.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.

callback errorOrResponse

error will contain information
if an error occurs; otherwise, response
will contain information related to this operation.

Source:

setProxy(proxy)

Sets proxy object specified by caller.

Parameters:
Name Type Description
proxy object

proxy to use for tunneling
{
host: hostname
port: port number
proxyAuth: 'user:password' for basic auth
headers: {...} headers for proxy server
key: key for proxy server
ca: ca for proxy server
cert: cert for proxy server
}
if null or undefined, clears proxy

Source:

withFilter(filter)

Associate a filtering operation with this StorageServiceClient. Filtering operations
can include logging, automatically retrying, etc. Filter operations are objects
that implement a method with the signature:

"function handle (requestOptions, next)".

After doing its preprocessing on the request options, the method needs to call
"next" passing a callback with the following signature:
signature:

"function (returnObject, finalCallback, next)"

In this callback, and after processing the returnObject (the response from the
request to the server), the callback needs to either invoke next if it exists to
continue processing other filters or simply invoke finalCallback otherwise to end
up the service invocation.

Parameters:
Name Type Description
filter Object

The new filter object.

Source:
Returns:

A new service client with the filter applied.

Type
StorageServiceClient