Creates an instance of ShareClient. Creates an instance of ShareClient.
Account connection string or a SAS connection string of an Azure storage account.
[ Note - Account connection string can only be used in NODE.JS runtime. ]
Account connection string example -
DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net
SAS connection string example -
BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString
Share name.
Optional. Options to configure the HTTP pipeline.
Creates an instance of ShareClient.
A URL string pointing to Azure Storage file share, such as "https://myaccount.file.core.windows.net/share". You can append a SAS if using AnonymousCredential, such as "https://myaccount.file.core.windows.net/share?sasString".
Such as AnonymousCredential or StorageSharedKeyCredential. If not specified, AnonymousCredential is used.
Optional. Options to configure the HTTP pipeline.
Creates an instance of ShareClient.
A URL string pointing to Azure Storage file share, such as "https://myaccount.file.core.windows.net/share". You can append a SAS if using AnonymousCredential, such as "https://myaccount.file.core.windows.net/share?sasString".
Call newPipeline() to create a default pipeline, or provide a customized pipeline.
Credential in the pipleline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential. Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.
Request policy pipeline.
StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.
URL string value.
The name of the share
Gets the directory client for the root directory of this share. Note that the root directory always exists and cannot be deleted.
Creates a new share under the specified account. If the share with the same name already exists, the operation fails.
Options to Share Create operation.
Response data for the Share Create operation.
Creates a new subdirectory under this share.
-
Options to Directory Create operation.
Directory creation response data and the corresponding directory client.
Creates a new file or replaces a file under the root directory of this share. Note it only initializes the file with no content.
-
Specifies the maximum size in bytes for the file, up to 4 TB.
Options to File Create operation.
File creation response data and the corresponding file client.
Creates a new share under the specified account. If the share with the same name already exists, it is not changed.
-
Creates a file permission (a security descriptor) at the share level. The created security descriptor can be used for the files/directories in the share.
File permission described in the SDDL
Options to Share Create Permission operation.
Creates a read-only snapshot of a share.
Options to Share Create Snapshot operation.
Response data for the Share Create Snapshot operation.
Marks the specified share for deletion. The share and any directories or files contained within it are later deleted during garbage collection.
Options to Share Delete operation.
Response data for the Share Delete operation.
Removes the specified empty sub directory under this share. Note that the directory must be empty before it can be deleted.
-
Options to Directory Delete operation.
Directory deletion response data.
Removes a file under the root directory of this share from the storage account. When a file is successfully deleted, it is immediately removed from the storage account's index and is no longer accessible to clients. The file's data is later removed from the service during garbage collection.
Delete File will fail with status code 409 (Conflict) and error code SharingViolation
if the file is open on an SMB client.
Delete File is not supported on a share snapshot, which is a read-only copy of
a share. An attempt to perform this operation on a share snapshot will fail with 400
(InvalidQueryParameterValue
)
-
Options to File Delete operation.
Promise
Marks the specified share for deletion if it exists. The share and any directories or files contained within it are later deleted during garbage collection.
-
Returns true if the Azrue share resource represented by this client exists; false otherwise.
NOTE: use this function with care since an existing share might be deleted by other clients or applications. Vice versa new shares might be added by other clients or applications after this function completes.
options to Exists operation.
Only available for ShareClient constructed with a shared key credential.
Generates a Service Shared Access Signature (SAS) URI based on the client properties and parameters passed in. The SAS is signed by the shared key credential of the client.
Optional parameters.
The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
Gets the permissions for the specified share. The permissions indicate whether share data may be accessed publicly.
WARNING: JavaScript Date will potential lost precision when parsing start and expiry string. For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
Response data for the Share Get Access Policy operation.
Creates a ShareDirectoryClient object.
A directory name
The ShareDirectoryClient object for the given directory name.
Gets the Security Descriptor Definition Language (SDDL) for a given file permission key which indicates a security descriptor.
File permission key which indicates the security descriptor of the permission.
Options to Share Create Permission operation.
Returns all user-defined metadata and system properties for the specified share.
Response data for the Share Get Properties operation.
Retrieves statistics related to the share.
Response data for the Share Get Statistics operation.
Sets the permissions for the specified share. The permissions indicate whether directories or files in a share may be accessed publicly.
When you set permissions for a share, the existing permissions are replaced. If no shareAcl provided, the existing share ACL will be removed.
When you establish a stored access policy on a share, it may take up to 30 seconds to take effect. During this interval, a shared access signature that is associated with the stored access policy will fail with status code 403 (Forbidden), until the access policy becomes active.
Array of signed identifiers, each having a unique Id and details of access policy.
Response data for the Share Set Access Policy operation.
Sets one or more user-defined name-value pairs for the specified share.
If no option provided, or no metadata defined in the option parameter, the share metadata will be removed.
If no metadata provided, all existing directory metadata will be removed.
Response data for the Share Set Metadata operation.
Sets properties of the share.
Response data for the Share Set Properties operation.
Sets quota for the specified share.
Specifies the maximum size of the share in gigabytes
Response data for the Share Get Quota operation.
Creates a new ShareClient object identical to the source but with the specified snapshot timestamp. Provide "" will remove the snapshot and return a URL to the base share.
The snapshot timestamp.
A new ShareClient object identical to the source but with the specified snapshot timestamp
Generated using TypeDoc
A ShareClient represents a URL to the Azure Storage share allowing you to manipulate its directories and files.