Share via


@azure/storage-file-share package

Classes

AccountSASPermissions

ONLY AVAILABLE IN NODE.JS RUNTIME. This is a helper class to construct a string representing the permissions granted by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on an <xref:AccountSASSignatureValues> object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

AccountSASResourceTypes

ONLY AVAILABLE IN NODE.JS RUNTIME. This is a helper class to construct a string representing the resources accessible by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant access to that resource type. Once all the values are set, this should be serialized with toString and set as the resources field on an <xref:AccountSASSignatureValues> object. It is possible to construct the resources string without this class, but the order of the resources is particular and this class guarantees correctness.

AccountSASServices

ONLY AVAILABLE IN NODE.JS RUNTIME. This is a helper class to construct a string representing the services accessible by an AccountSAS. Setting a value to true means that any SAS which uses these permissions will grant access to that service. Once all the values are set, this should be serialized with toString and set as the services field on an <xref:AccountSASSignatureValues> object. It is possible to construct the services string without this class, but the order of the services is particular and this class guarantees correctness.

AnonymousCredential

AnonymousCredential provides a credentialPolicyCreator member used to create <xref:AnonymousCredentialPolicy> objects. AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources or for use with Shared Access Signatures (SAS).

AnonymousCredentialPolicy

AnonymousCredentialPolicy is used with HTTP(S) requests that read public resources or for use with Shared Access Signatures (SAS).

Credential

Credential is an abstract class for Azure Storage HTTP requests signing. This class will host an credentialPolicyCreator factory which generates CredentialPolicy.

CredentialPolicy

Credential policy used to sign HTTP(S) requests before sending. This is an abstract class.

FileSASPermissions

ONLY AVAILABLE IN NODE.JS RUNTIME. This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a file. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on a <xref:FileSASSignatureValues> object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

FileSystemAttributes

This is a helper class to construct a string representing the NTFS attributes to a file or directory.

Pipeline

A Pipeline class containing HTTP request policies. You can create a default Pipeline by calling <xref:newPipeline>. Or you can create a Pipeline with your own policies by the constructor of Pipeline. Refer to <xref:newPipeline> and provided policies as reference before implementing your customized Pipeline.

SASQueryParameters

Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly by the user; it is only generated by the <xref:AccountSASSignatureValues> and <xref:FileSASSignatureValues> types. Once generated, it can be encoded into a <xref:String> and appended to a URL directly (though caution should be taken here in case there are existing query parameters, which might affect the appropriate means of appending these query parameters). NOTE: Instances of this class are immutable.

ShareClient

A ShareClient represents a URL to the Azure Storage share allowing you to manipulate its directories and files.

ShareDirectoryClient

A ShareDirectoryClient represents a URL to the Azure Storage directory allowing you to manipulate its files and directories.

ShareFileClient

A ShareFileClient represents a URL to an Azure Storage file.

ShareLeaseClient

A client that manages leases for a <xref:ShareFileClient> or <xref:ShareClient>.

ShareSASPermissions

This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a share. Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all the values are set, this should be serialized with toString and set as the permissions field on a <xref:FileSASSignatureValues> object. It is possible to construct the permissions string without this class, but the order of the permissions is particular and this class guarantees correctness.

ShareServiceClient

A ShareServiceClient represents a URL to the Azure Storage File service allowing you to manipulate file shares.

StorageBrowserPolicy

StorageBrowserPolicy will handle differences between Node.js and browser runtime, including:

  1. Browsers cache GET/HEAD requests by adding conditional headers such as 'IF_MODIFIED_SINCE'. StorageBrowserPolicy is a policy used to add a timestamp query to GET/HEAD request URL thus avoid the browser cache.

  2. Remove cookie header for security

  3. Remove content-length header to avoid browsers warning

StorageBrowserPolicyFactory

StorageBrowserPolicyFactory is a factory class helping generating BrowserPolicy objects.

StorageClient

A StorageClient represents a base client class for ServiceClient, ContainerClient and etc.

StorageClientContext
StorageRetryPolicy

Retry policy with exponential retry and linear retry implemented.

StorageRetryPolicyFactory

StorageRetryPolicyFactory is a factory class helping generating StorageRetryPolicy objects.

StorageSharedKeyCredential

ONLY AVAILABLE IN NODE.JS RUNTIME. StorageSharedKeyCredential for account key authorization of Azure Storage service.

StorageSharedKeyCredentialPolicy

StorageSharedKeyCredentialPolicy is a policy used to sign HTTP request with a shared key.

Interfaces

AccessPolicy

An Access policy.

AccountSASSignatureValues

ONLY AVAILABLE IN NODE.JS RUNTIME. AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once all the values here are set appropriately, call <xref:generateAccountSASQueryParameters> to obtain a representation of the SAS which can actually be applied to file urls. Note: that both this class and <xref:SASQueryParameters> exist because the former is mutable and a logical representation while the latter is immutable and used to generate actual REST requests.

ClearRange
CloseHandlesInfo

Close handles result information.

CommonGenerateSasUrlOptions

Common options of the <xref:ShareGenerateSasUrlOptions> and <xref:FileGenerateSasUrlOptions>.

CommonOptions

An interface for options common to every remote operation.

CopyFileSmbInfo

Parameter group

CorsRule

CORS is an HTTP feature that enables a web application running under one domain to access resources in another domain. Web browsers implement a security restriction known as same-origin policy that prevents a web page from calling APIs in a different domain; CORS provides a secure way to allow one domain (the origin domain) to call APIs in another domain.

DirectoryCloseHandlesHeaders

Additional response header values for close handles request.

DirectoryCreateHeaders

Defines headers for Directory_create operation.

DirectoryCreateIfNotExistsResponse

Contains response data for the <xref:DirectoryClient.createIfNotExists> operation.

DirectoryCreateOptions

Options to configure <xref:ShareDirectoryClient.create> operation.

DirectoryDeleteHeaders

Defines headers for Directory_delete operation.

DirectoryDeleteIfExistsResponse

Contains response data for the <xref:DirectoryClient.deleteIfExists> operation.

DirectoryDeleteOptions

Options to configure the <xref:ShareDirectoryClient.delete> operation.

DirectoryExistsOptions

Options to configure the <xref:ShareDirectoryClient.exists> operation.

DirectoryForceCloseHandlesHeaders

Defines headers for Directory_forceCloseHandles operation.

DirectoryForceCloseHandlesOptions

Options to configure <xref:ShareDirectoryClient.forceCloseHandle>.

DirectoryForceCloseHandlesSegmentOptions

Options to configure Directory - Force Close Handles Segment operations. See:

  • <xref:ShareDirectoryClient.forceCloseHandlesSegment>
  • <xref:ShareDirectoryClient.forceCloseAllHandles>
DirectoryGetPropertiesHeaders

Defines headers for Directory_getProperties operation.

DirectoryGetPropertiesOptions

Options to configure the <xref:ShareDirectoryClient.getProperties> operation.

DirectoryItem

A listed directory item.

DirectoryListFilesAndDirectoriesOptions

Options to configure <xref:ShareDirectoryClient.listFilesAndDirectories> operation.

DirectoryListFilesAndDirectoriesSegmentHeaders

Defines headers for Directory_listFilesAndDirectoriesSegment operation.

DirectoryListHandlesHeaders

Defines headers for Directory_listHandles operation.

DirectoryListHandlesOptions

Options to configure the <xref:ShareDirectoryClient.listHandles> operation.

DirectoryListHandlesSegmentOptions

Options to configure Directory - List Handles Segment operations. See:

  • <xref:ShareDirectoryClient.listHandlesSegment>
  • <xref:ShareDirectoryClient.iterateHandleSegments>
  • <xref:ShareDirectoryClient.listHandleItems>
DirectoryProperties
DirectorySetMetadataHeaders

Defines headers for Directory_setMetadata operation.

DirectorySetMetadataOptions

Options to configure the <xref:ShareDirectoryClient.setMetadata> operation.

DirectorySetPropertiesHeaders

Defines headers for Directory_setProperties operation.

FileAbortCopyFromURLOptions

Options to configure the <xref:ShareFileClient.abortCopyFromURL> operation.

FileAbortCopyHeaders

Defines headers for File_abortCopy operation.

FileAndDirectoryCreateCommonOptions
FileAndDirectorySetPropertiesCommonOptions
FileClearRangeOptions

Options to configure the <xref:ShareFileClient.clearRange> operation.

FileCloseHandlesHeaders

Additional response header values for close handles request.

FileCreateHeaders

Defines headers for File_create operation.

FileCreateOptions

Options to configure the <xref:ShareFileClient.create> operation.

FileDeleteHeaders

Defines headers for File_delete operation.

FileDeleteIfExistsResponse

Contains response data for the <xref:ShareFileClient.deleteIfExists> operation.

FileDeleteOptions

Options to configure the <xref:ShareFileClient.delete> operation.

FileDownloadHeaders

Defines headers for File_download operation.

FileDownloadOptionalParams

Optional parameters.

FileDownloadOptions

Options to configure File - Download operations. See:

  • <xref:ShareFileClient.download>
  • <xref:ShareFileClient.downloadToFile>
FileDownloadToBufferOptions

Option interface for the <xref:ShareFileClient.downloadToBuffer> operation.

FileExistsOptions

Options to configure the <xref:ShareFileClient.exists> operation.

FileForceCloseHandlesHeaders

Defines headers for File_forceCloseHandles operation.

FileForceCloseHandlesOptions

Options to configure File - Force Close Handles operations. See:

  • <xref:ShareFileClient.forceCloseHandlesSegment>
  • <xref:ShareFileClient.forceCloseAllHandles>
  • <xref:ShareFileClient.forceCloseHandle>
FileGenerateSasUrlOptions

Options to configure <xref:ShareFileClient.generateSasUrl> operation.

FileGetPropertiesHeaders

Defines headers for File_getProperties operation.

FileGetPropertiesOptions

Options to configure the <xref:ShareFileClient.getProperties> operation.

FileGetRangeListHeaders

Defines headers for File_getRangeList operation.

FileGetRangeListOptions

Options to configure the <xref:ShareFileClient.getRangeList> operation.

FileHttpHeaders
FileItem

A listed file item.

FileListHandlesHeaders

Defines headers for File_listHandles operation.

FileListHandlesOptions
FileListHandlesSegmentOptions

Options to configure File - List Handles Segment operations. See:

  • <xref:ShareFileClient.listHandlesSegment>
  • <xref:ShareFileClient.iterateHandleSegments>
  • <xref:ShareFileClient.listHandleItems>
FileParallelUploadOptions

Option interface for File - Upload operations See:

  • <xref:ShareFileClient.uploadFile>
  • <xref:ShareFileClient.uploadSeekableStream>
FileProperties
FileProperty

File properties.

FileResizeOptions

Options to configure the <xref:ShareFileClient.resize> operation.

FileSASSignatureValues

ONLY AVAILABLE IN NODE.JS RUNTIME. FileSASSignatureValues is used to help generating File service SAS tokens for shares or files.

FileServiceProperties

Storage service properties.

FileSetHTTPHeadersHeaders

Defines headers for File_setHttpHeaders operation.

FileSetHttpHeadersOptions

Options to configure the <xref:ShareFileClient.setHttpHeaders> operation.

FileSetMetadataHeaders

Defines headers for File_setMetadata operation.

FileSetMetadataOptions

Options to configure the <xref:ShareFileClient.setMetadata> operation.

FileStartCopyHeaders

Defines headers for File_startCopy operation.

FileStartCopyOptions

Options to configure the <xref:ShareFileClient.startCopyFromURL> operation.

FileUploadRangeFromURLHeaders

Defines headers for File_uploadRangeFromURL operation.

FileUploadRangeFromURLOptionalParams

Optional parameters.

FileUploadRangeFromURLOptions

Options to configure the <xref:ShareFileClient.uploadRangeFromURL> operation.

FileUploadRangeHeaders

Defines headers for File_uploadRange operation.

FileUploadRangeOptions

Options to configure the <xref:ShareFileClient.uploadRange> operation.

FileUploadStreamOptions

Option interface for ShareFileClient.uploadStream().

FilesAndDirectoriesListSegment

Abstract for entries that can be listed from Directory.

HandleItem

A listed Azure Storage handle item.

HttpAuthorization

Represents authentication information in Authorization, ProxyAuthorization, WWW-Authenticate, and Proxy-Authenticate header values.

LeaseAccessConditions

Parameter group

LeaseOperationOptions

lease operations options.

LeaseOperationResponseHeaders

The details of the response for a specific lease operation.

ListFilesAndDirectoriesSegmentResponse

An enumeration of directories and files.

ListHandlesResponse

An enumeration of handles.

ListSharesResponse

An enumeration of shares.

ListSharesResponseModel

An enumeration of shares.

Metadata
Metrics

Storage Analytics metrics for file service.

PipelineOptions

Option interface for Pipeline constructor.

Range

Range for Service Operations.

RangeModel

An Azure Storage file range.

RetentionPolicy

The retention policy.

SasIPRange

Allowed IP range for a SAS.

ServiceGenerateAccountSasUrlOptions

Options to configure <xref:ShareServiceClient.generateAccountSasUrl> operation.

ServiceGetPropertiesHeaders

Defines headers for Service_getProperties operation.

ServiceGetPropertiesOptions

Options to configure the <xref:ShareServiceClient.getProperties> operation.

ServiceListSharesOptions

Options to configure the <xref:ShareServiceClient.listShares> operation.

ServiceListSharesSegmentHeaders

Defines headers for Service_listSharesSegment operation.

ServiceSetPropertiesHeaders

Defines headers for Service_setProperties operation.

ServiceSetPropertiesOptions

Options to configure the <xref:ShareServiceClient.setProperties> operation.

ServiceUndeleteShareOptions

Options to configure the <xref:ShareServiceClient.undelete> operation.

SetPropertiesResponse
ShareCreateHeaders

Defines headers for Share_create operation.

ShareCreateIfNotExistsResponse

Contains response data for the <xref:ShareClient.createIfNotExists> operation.

ShareCreateOptions

Options to configure the <xref:ShareClient.create> operation.

ShareCreatePermissionHeaders

Defines headers for Share_createPermission operation.

ShareCreatePermissionOptions

Options to configure the <xref:ShareClient.createPermission> operation.

ShareCreateSnapshotHeaders

Defines headers for Share_createSnapshot operation.

ShareCreateSnapshotOptions

Options to configure the <xref:ShareClient.createSnapshot> operation.

ShareDeleteHeaders

Defines headers for Share_delete operation.

ShareDeleteIfExistsResponse

Contains response data for the <xref:ShareClient.deleteIfExists> operation.

ShareDeleteMethodOptions

Options to configure the <xref:ShareClient.delete> operation.

ShareExistsOptions

Options to configure the <xref:ShareClient.exists> operation.

ShareFileRangeList

The list of file ranges

ShareGenerateSasUrlOptions

Options to configure <xref:ShareClient.generateSasUrl> operation.

ShareGetAccessPolicyHeaders

Defines headers for Share_getAccessPolicy operation.

ShareGetAccessPolicyOptions

Options to configure the <xref:ShareClient.getAccessPolicy> operation.

ShareGetPermissionHeaders

Defines headers for Share_getPermission operation.

ShareGetPermissionOptions

Options to configure the <xref:ShareClient.getPermission> operation.

ShareGetPropertiesHeaders

Defines headers for Share_getProperties operation.

ShareGetPropertiesOptions

Options to configure the <xref:ShareClient.getProperties> operation.

ShareGetStatisticsHeaders

Defines headers for Share_getStatistics operation.

ShareGetStatisticsOptions

Options to configure the <xref:ShareClient.getStatistics> operation.

ShareItem

A listed Azure Storage share item.

ShareItemInternal

A listed Azure Storage share item.

SharePermission

A permission (a security descriptor) at the share level.

SharePropertiesInternal

Properties of a share.

ShareProtocolSettings

Protocol settings

ShareProtocols

Protocols to enable on the share. For now, only support SMB or NFS.

ShareSetAccessPolicyHeaders

Defines headers for Share_setAccessPolicy operation.

ShareSetAccessPolicyOptions

Options to configure the <xref:ShareClient.setAccessPolicy> operation.

ShareSetMetadataHeaders

Defines headers for Share_setMetadata operation.

ShareSetMetadataOptions

Options to configure the <xref:ShareClient.setMetadata> operation.

ShareSetPropertiesHeaders

Defines headers for Share_setProperties operation.

ShareSetPropertiesOptions

Options to configure the <xref:ShareClient.setProperties> operation.

ShareSetQuotaOptions

Options to configure the <xref:ShareClient.setQuota> operation.

ShareSmbSettings

Settings for SMB protocol.

ShareStats

Stats for the share.

SignedIdentifier

Signed Identifier

SignedIdentifierModel

Signed identifier.

SmbMultichannel

Settings for SMB multichannel

SourceModifiedAccessConditions

Parameter group

StorageClientOptionalParams

Optional parameters.

StoragePipelineOptions

Option interface for <xref:newPipeline> function.

StorageRetryOptions

Retry options interface.

Type Aliases

CopyStatusType

Defines values for CopyStatusType.

CredentialPolicyCreator

A factory function that creates a new CredentialPolicy that uses the provided nextPolicy.

DeleteSnapshotsOptionType

Defines values for DeleteSnapshotsOptionType.

DirectoryCreateResponse

Contains response data for the create operation.

DirectoryDeleteResponse

Contains response data for the delete operation.

DirectoryForceCloseHandlesResponse

Response type for <xref:ShareDirectoryClient.forceCloseHandle>.

DirectoryGetPropertiesResponse

Contains response data for the getProperties operation.

DirectoryListFilesAndDirectoriesSegmentResponse

Contains response data for the listFilesAndDirectoriesSegment operation.

DirectoryListHandlesResponse

Contains response data for the listHandles operation.

DirectorySetMetadataResponse

Contains response data for the setMetadata operation.

DirectorySetPropertiesResponse

Contains response data for the setProperties operation.

FileAbortCopyResponse

Contains response data for the abortCopy operation.

FileAttributesPreserveType

Indicates keep existing file attributes unchanged.

FileCreateResponse

Contains response data for the create operation.

FileDeleteResponse

Contains response data for the delete operation.

FileDownloadResponseModel

Contains response data for the download operation.

FileForceCloseHandlesResponse

Response type for <xref:ShareFileClient.forceCloseHandle>.

FileGetPropertiesResponse

Contains response data for the getProperties operation.

FileGetRangeListDiffResponse

Contains response data for the getRangeList operation.

FileGetRangeListResponse

Contains response data for the <xref:ShareFileClient.getRangeList> operation.

FileListHandlesResponse

Contains response data for the listHandles operation.

FilePermissionInheritType

Indicates inherit file permission from the parent directory.

FilePermissionPreserveType

Indicates keep existing file permission value unchanged.

FileSetHTTPHeadersResponse

Contains response data for the setHttpHeaders operation.

FileSetMetadataResponse

Contains response data for the setMetadata operation.

FileStartCopyResponse

Contains response data for the startCopy operation.

FileType

Defines values for FileType. Possible values include: 'File'

FileUploadRangeFromURLResponse

Contains response data for the uploadRangeFromURL operation.

FileUploadRangeResponse

Contains response data for the uploadRange operation.

LeaseDurationType

Defines values for LeaseDurationType.

LeaseOperationResponse

Contains the response data for operations that acquire, change, break or release a lease. See <xref:ShareLeaseClient>.

LeaseStateType

Defines values for LeaseStateType.

LeaseStatusType

Defines values for LeaseStatusType.

ListSharesIncludeType

Defines values for ListSharesIncludeType.

PermissionCopyModeType

Defines values for PermissionCopyModeType.

ServiceGetPropertiesResponse

Contains response data for the getProperties operation.

ServiceListSharesSegmentResponse

Contains response data for the <xref:ShareServiceClient.listShares> operation.

ServiceSetPropertiesResponse

Contains response data for the setProperties operation.

ShareAccessTier

Defines values for ShareAccessTier.

ShareCreatePermissionResponse

Contains response data for the createPermission operation.

ShareCreateResponse

Contains response data for the create operation.

ShareCreateSnapshotResponse

Contains response data for the createSnapshot operation.

ShareDeleteResponse

Contains response data for the delete operation.

ShareGetAccessPolicyResponse
ShareGetPermissionResponse

Contains response data for the getPermission operation.

ShareGetPropertiesResponse

Contains response data for the <xref:ShareClient.getProperties> operation.

ShareGetPropertiesResponseModel

Contains response data for the getProperties operation.

ShareGetStatisticsResponse

Response data for the <xref:ShareClient.getStatistics> Operation.

ShareGetStatisticsResponseModel

Contains response data for the getStatistics operation.

ShareProperties

Properties of a share.

ShareRootSquash

Defines values for ShareRootSquash.

ShareSetAccessPolicyResponse

Contains response data for the setAccessPolicy operation.

ShareSetMetadataResponse

Contains response data for the setMetadata operation.

ShareSetPropertiesResponse

Contains response data for the setProperties operation.

ShareSetQuotaHeaders

Defines headers for setQuota operation.

ShareSetQuotaResponse

Contains response data for the setQuota operation.

TimeNowType

Indicates setting as the time of the request.

TimePreserveType

Indicates keep existing time value unchanged.

Enums

SASProtocol

Protocols for generated SAS.

StorageRetryPolicyType

RetryPolicy types.

Functions

generateAccountSASQueryParameters(AccountSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME. Generates a <xref:SASQueryParameters> object which contains all SAS query parameters needed to make an actual REST request.

generateFileSASQueryParameters(FileSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME. Creates an instance of SASQueryParameters.

Only accepts required settings needed to create a SAS. For optional settings please set corresponding properties directly, such as permissions, startsOn and identifier.

WARNING: When identifier is not provided, permissions and expiresOn are required. You MUST assign value to identifier or expiresOn & permissions manually if you initial with this constructor.

newPipeline(Credential, StoragePipelineOptions)

Creates a new <xref:Pipeline> object with <xref:Credential> provided.

Function Details

generateAccountSASQueryParameters(AccountSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME. Generates a <xref:SASQueryParameters> object which contains all SAS query parameters needed to make an actual REST request.

function generateAccountSASQueryParameters(accountSASSignatureValues: AccountSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential)

Parameters

accountSASSignatureValues
AccountSASSignatureValues
sharedKeyCredential
StorageSharedKeyCredential

Returns

generateFileSASQueryParameters(FileSASSignatureValues, StorageSharedKeyCredential)

ONLY AVAILABLE IN NODE.JS RUNTIME. Creates an instance of SASQueryParameters.

Only accepts required settings needed to create a SAS. For optional settings please set corresponding properties directly, such as permissions, startsOn and identifier.

WARNING: When identifier is not provided, permissions and expiresOn are required. You MUST assign value to identifier or expiresOn & permissions manually if you initial with this constructor.

function generateFileSASQueryParameters(fileSASSignatureValues: FileSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential)

Parameters

fileSASSignatureValues
FileSASSignatureValues
sharedKeyCredential
StorageSharedKeyCredential

Returns

newPipeline(Credential, StoragePipelineOptions)

Creates a new <xref:Pipeline> object with <xref:Credential> provided.

function newPipeline(credential?: Credential, pipelineOptions?: StoragePipelineOptions)

Parameters

credential
Credential

Such as AnonymousCredential, StorageSharedKeyCredential.

pipelineOptions
StoragePipelineOptions

Optional. Options.

Returns

A new Pipeline object.