FileShares class

Class representing a FileShares.

Constructors

FileShares(StorageManagementClientContext)

Create a FileShares.

Methods

create(string, string, string, FileShare, FileSharesCreateOptionalParams, ServiceCallback<FileShare>)
create(string, string, string, FileShare, Models.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.

create(string, string, string, FileShare, ServiceCallback<FileShare>)
deleteMethod(string, string, string, FileSharesDeleteMethodOptionalParams, ServiceCallback<void>)
deleteMethod(string, string, string, Models.FileSharesDeleteMethodOptionalParams)

Deletes specified share under its account.

deleteMethod(string, string, string, ServiceCallback<void>)
get(string, string, string, FileSharesGetOptionalParams, ServiceCallback<FileShare>)
get(string, string, string, Models.FileSharesGetOptionalParams)

Gets properties of a specified share.

get(string, string, string, ServiceCallback<FileShare>)
list(string, string, FileSharesListOptionalParams, ServiceCallback<FileShareItems>)
list(string, string, Models.FileSharesListOptionalParams)

Lists all shares.

list(string, string, ServiceCallback<FileShareItems>)
listNext(string, FileSharesListNextOptionalParams, ServiceCallback<FileShareItems>)
listNext(string, Models.FileSharesListNextOptionalParams)

Lists all shares.

listNext(string, ServiceCallback<FileShareItems>)
restore(string, string, string, string, string, msRest.RequestOptionsBase)

Restore a file share within a valid retention days if share soft delete is enabled

restore(string, string, string, string, string, RequestOptionsBase, ServiceCallback<void>)
restore(string, string, string, string, string, ServiceCallback<void>)
update(string, string, string, FileShare, msRest.RequestOptionsBase)

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.

update(string, string, string, FileShare, RequestOptionsBase, ServiceCallback<FileShare>)
update(string, string, string, FileShare, ServiceCallback<FileShare>)

Constructor Details

FileShares(StorageManagementClientContext)

Create a FileShares.

new FileShares(client: StorageManagementClientContext)

Parameters

client
StorageManagementClientContext

Reference to the service client.

Method Details

create(string, string, string, FileShare, FileSharesCreateOptionalParams, ServiceCallback<FileShare>)

function create(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options: FileSharesCreateOptionalParams, callback: ServiceCallback<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 optional parameters

callback

ServiceCallback<FileShare>

The callback

create(string, string, string, FileShare, Models.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?: Models.FileSharesCreateOptionalParams)

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
Models.FileSharesCreateOptionalParams

Returns

Promise<Models.FileSharesCreateResponse>

Promise<Models.FileSharesCreateResponse>

create(string, string, string, FileShare, ServiceCallback<FileShare>)

function create(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, callback: ServiceCallback<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.

callback

ServiceCallback<FileShare>

The callback

deleteMethod(string, string, string, FileSharesDeleteMethodOptionalParams, ServiceCallback<void>)

function deleteMethod(resourceGroupName: string, accountName: string, shareName: string, options: FileSharesDeleteMethodOptionalParams, callback: ServiceCallback<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
FileSharesDeleteMethodOptionalParams

The optional parameters

callback

ServiceCallback<void>

The callback

deleteMethod(string, string, string, Models.FileSharesDeleteMethodOptionalParams)

Deletes specified share under its account.

function deleteMethod(resourceGroupName: string, accountName: string, shareName: string, options?: Models.FileSharesDeleteMethodOptionalParams)

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
Models.FileSharesDeleteMethodOptionalParams

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

deleteMethod(string, string, string, ServiceCallback<void>)

function deleteMethod(resourceGroupName: string, accountName: string, shareName: string, callback: ServiceCallback<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.

callback

ServiceCallback<void>

The callback

get(string, string, string, FileSharesGetOptionalParams, ServiceCallback<FileShare>)

function get(resourceGroupName: string, accountName: string, shareName: string, options: FileSharesGetOptionalParams, callback: ServiceCallback<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 optional parameters

callback

ServiceCallback<FileShare>

The callback

get(string, string, string, Models.FileSharesGetOptionalParams)

Gets properties of a specified share.

function get(resourceGroupName: string, accountName: string, shareName: string, options?: Models.FileSharesGetOptionalParams)

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
Models.FileSharesGetOptionalParams

Returns

Promise<Models.FileSharesGetResponse>

Promise<Models.FileSharesGetResponse>

get(string, string, string, ServiceCallback<FileShare>)

function get(resourceGroupName: string, accountName: string, shareName: string, callback: ServiceCallback<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.

callback

ServiceCallback<FileShare>

The callback

list(string, string, FileSharesListOptionalParams, ServiceCallback<FileShareItems>)

function list(resourceGroupName: string, accountName: string, options: FileSharesListOptionalParams, callback: ServiceCallback<FileShareItems>)

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 optional parameters

callback

ServiceCallback<FileShareItems>

The callback

list(string, string, Models.FileSharesListOptionalParams)

Lists all shares.

function list(resourceGroupName: string, accountName: string, options?: Models.FileSharesListOptionalParams)

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
Models.FileSharesListOptionalParams

Returns

Promise<Models.FileSharesListResponse>

Promise<Models.FileSharesListResponse>

list(string, string, ServiceCallback<FileShareItems>)

function list(resourceGroupName: string, accountName: string, callback: ServiceCallback<FileShareItems>)

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.

callback

ServiceCallback<FileShareItems>

The callback

listNext(string, FileSharesListNextOptionalParams, ServiceCallback<FileShareItems>)

function listNext(nextPageLink: string, options: FileSharesListNextOptionalParams, callback: ServiceCallback<FileShareItems>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
FileSharesListNextOptionalParams

The optional parameters

callback

ServiceCallback<FileShareItems>

The callback

listNext(string, Models.FileSharesListNextOptionalParams)

Lists all shares.

function listNext(nextPageLink: string, options?: Models.FileSharesListNextOptionalParams)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

options
Models.FileSharesListNextOptionalParams

Returns

Promise<Models.FileSharesListNextResponse>

Promise<Models.FileSharesListNextResponse>

listNext(string, ServiceCallback<FileShareItems>)

function listNext(nextPageLink: string, callback: ServiceCallback<FileShareItems>)

Parameters

nextPageLink

string

The NextLink from the previous successful call to List operation.

callback

ServiceCallback<FileShareItems>

The callback

restore(string, string, string, string, string, msRest.RequestOptionsBase)

Restore a file share within a valid retention days if share soft delete is enabled

function restore(resourceGroupName: string, accountName: string, shareName: string, deletedShareName: string, deletedShareVersion: string, options?: msRest.RequestOptionsBase)

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.

deletedShareName

string

Required. Identify the name of the deleted share that will be restored.

deletedShareVersion

string

Required. Identify the version of the deleted share that will be restored.

options
msRest.RequestOptionsBase

Returns

Promise<RestResponse>

Promise<msRest.RestResponse>

restore(string, string, string, string, string, RequestOptionsBase, ServiceCallback<void>)

function restore(resourceGroupName: string, accountName: string, shareName: string, deletedShareName: string, deletedShareVersion: string, options: RequestOptionsBase, callback: ServiceCallback<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.

deletedShareName

string

Required. Identify the name of the deleted share that will be restored.

deletedShareVersion

string

Required. Identify the version of the deleted share that will be restored.

options

RequestOptionsBase

The optional parameters

callback

ServiceCallback<void>

The callback

restore(string, string, string, string, string, ServiceCallback<void>)

function restore(resourceGroupName: string, accountName: string, shareName: string, deletedShareName: string, deletedShareVersion: string, callback: ServiceCallback<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.

deletedShareName

string

Required. Identify the name of the deleted share that will be restored.

deletedShareVersion

string

Required. Identify the version of the deleted share that will be restored.

callback

ServiceCallback<void>

The callback

update(string, string, string, FileShare, msRest.RequestOptionsBase)

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?: msRest.RequestOptionsBase)

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
msRest.RequestOptionsBase

Returns

Promise<Models.FileSharesUpdateResponse>

Promise<Models.FileSharesUpdateResponse>

update(string, string, string, FileShare, RequestOptionsBase, ServiceCallback<FileShare>)

function update(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options: RequestOptionsBase, callback: ServiceCallback<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

RequestOptionsBase

The optional parameters

callback

ServiceCallback<FileShare>

The callback

update(string, string, string, FileShare, ServiceCallback<FileShare>)

function update(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, callback: ServiceCallback<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.

callback

ServiceCallback<FileShare>

The callback