FileShares interface
Interface representing a FileShares.
Methods
create(string, string, string, File |
Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share. |
delete(string, string, string, File |
Deletes specified share under its account. |
get(string, string, string, File |
Gets properties of a specified share. |
lease(string, string, string, File |
The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite. |
list(string, string, File |
Lists all shares. |
restore(string, string, string, Deleted |
Restore a file share within a valid retention days if share soft delete is enabled |
update(string, string, string, File |
Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist. |
Method Details
create(string, string, string, FileShare, FileSharesCreateOptionalParams)
Creates a new share under the specified account as described by request body. The share resource includes metadata and properties for that share. It does not include a list of the files contained by the share.
function create(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options?: FileSharesCreateOptionalParams): Promise<FileShare>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- shareName
-
string
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- fileShare
- FileShare
Properties of the file share to create.
- options
- FileSharesCreateOptionalParams
The options parameters.
Returns
Promise<FileShare>
delete(string, string, string, FileSharesDeleteOptionalParams)
Deletes specified share under its account.
function delete(resourceGroupName: string, accountName: string, shareName: string, options?: FileSharesDeleteOptionalParams): Promise<void>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- shareName
-
string
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options
- FileSharesDeleteOptionalParams
The options parameters.
Returns
Promise<void>
get(string, string, string, FileSharesGetOptionalParams)
Gets properties of a specified share.
function get(resourceGroupName: string, accountName: string, shareName: string, options?: FileSharesGetOptionalParams): Promise<FileShare>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- shareName
-
string
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options
- FileSharesGetOptionalParams
The options parameters.
Returns
Promise<FileShare>
lease(string, string, string, FileSharesLeaseOptionalParams)
The Lease Share operation establishes and manages a lock on a share for delete operations. The lock duration can be 15 to 60 seconds, or can be infinite.
function lease(resourceGroupName: string, accountName: string, shareName: string, options?: FileSharesLeaseOptionalParams): Promise<FileSharesLeaseResponse>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- shareName
-
string
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- options
- FileSharesLeaseOptionalParams
The options parameters.
Returns
Promise<FileSharesLeaseResponse>
list(string, string, FileSharesListOptionalParams)
Lists all shares.
function list(resourceGroupName: string, accountName: string, options?: FileSharesListOptionalParams): PagedAsyncIterableIterator<FileShareItem, FileShareItem[], PageSettings>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- options
- FileSharesListOptionalParams
The options parameters.
Returns
restore(string, string, string, DeletedShare, FileSharesRestoreOptionalParams)
Restore a file share within a valid retention days if share soft delete is enabled
function restore(resourceGroupName: string, accountName: string, shareName: string, deletedShare: DeletedShare, options?: FileSharesRestoreOptionalParams): Promise<void>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- shareName
-
string
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- deletedShare
- DeletedShare
The deleted share to be restored.
- options
- FileSharesRestoreOptionalParams
The options parameters.
Returns
Promise<void>
update(string, string, string, FileShare, FileSharesUpdateOptionalParams)
Updates share properties as specified in request body. Properties not mentioned in the request will not be changed. Update fails if the specified share does not already exist.
function update(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options?: FileSharesUpdateOptionalParams): Promise<FileShare>
Parameters
- resourceGroupName
-
string
The name of the resource group within the user's subscription. The name is case insensitive.
- accountName
-
string
The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.
- shareName
-
string
The name of the file share within the specified storage account. File share names must be between 3 and 63 characters in length and use numbers, lower-case letters and dash (-) only. Every dash (-) character must be immediately preceded and followed by a letter or number.
- fileShare
- FileShare
Properties to update for the file share.
- options
- FileSharesUpdateOptionalParams
The options parameters.
Returns
Promise<FileShare>