Creates an instance of ShareServiceClient.
A URL string pointing to Azure Storage file service, such as "https://myaccount.file.core.windows.net". You can Append a SAS if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString".
Creates an instance of ShareServiceClient.
A URL string pointing to Azure Storage file service, such as "https://myaccount.file.core.windows.net". You can Append a SAS if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString".
Call newPipeline() to create a default pipeline, or provide a customized pipeline.
StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.
URL string value.
Creates a Share.
} Share creation response and the corresponding share client.
Deletes a Share.
Share deletion response and the corresponding share client.
Gets the properties of a storage account’s file service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
Response data for the Get Properties operation.
Creates a ShareClient object.
Name of a share.
The ShareClient object for the given share name.
Returns an async iterable iterator to list all the shares under the specified account.
.byPage() returns an async iterable iterator to list the shares in pages.
Example using for await
syntax:
let i = 1;
for await (const share of serviceClient.listShares()) {
console.log(`Share ${i++}: ${share.name}`);
}
Example using iter.next()
:
let i = 1;
let iter = serviceClient.listShares();
let shareItem = await iter.next();
while (!shareItem.done) {
console.log(`Share ${i++}: ${shareItem.value.name}`);
shareItem = await iter.next();
}
Example using byPage()
:
// passing optional maxPageSize in the page settings
let i = 1;
for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {
if (response.shareItems) {
for (const share of response.shareItems) {
console.log(`Share ${i++}: ${share.name}`);
}
}
}
Example using paging with a marker:
let i = 1;
let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });
let response = (await iterator.next()).value;
// Prints 2 share names
if (response.shareItems) {
for (const share of response.shareItems) {
console.log(`Share ${i++}: ${share.name}`);
}
}
// Gets next marker
let marker = response.continuationToken;
// Passing next marker as continuationToken
iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });
response = (await iterator.next()).value;
// Prints 10 share names
if (response.shareItems) {
for (const share of response.shareItems) {
console.log(`Share ${i++}: ${share.name}`);
}
}
An asyncIterableIterator that supports paging.
Sets properties for a storage account’s file service endpoint, including properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
Response data for the Set Properties operation.
Restores a previously deleted share. This API is only functional if Share Soft Delete is enabled for the storage account associated with the share.
The name of the previously deleted share.
The version of the previously deleted share.
Restored share.
Creates an instance of ShareServiceClient from connection string.
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
A new ShareServiceClient from the given connection string.
Generated using TypeDoc
A ShareServiceClient represents a URL to the Azure Storage File service allowing you to manipulate file shares.