Package version:

Interface FileShares

Interface representing a FileShares.

interface FileShares {
    create(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options?: FileSharesCreateOptionalParams): Promise<FileShare>;
    delete(resourceGroupName: string, accountName: string, shareName: string, options?: FileSharesDeleteOptionalParams): Promise<void>;
    get(resourceGroupName: string, accountName: string, shareName: string, options?: FileSharesGetOptionalParams): Promise<FileShare>;
    lease(resourceGroupName: string, accountName: string, shareName: string, options?: FileSharesLeaseOptionalParams): Promise<FileSharesLeaseResponse>;
    list(resourceGroupName: string, accountName: string, options?: FileSharesListOptionalParams): PagedAsyncIterableIterator<FileShareItem>;
    restore(resourceGroupName: string, accountName: string, shareName: string, deletedShare: DeletedShare, options?: FileSharesRestoreOptionalParams): Promise<void>;
    update(resourceGroupName: string, accountName: string, shareName: string, fileShare: FileShare, options?: FileSharesUpdateOptionalParams): Promise<FileShare>;
}

Methods

  • 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.

    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.

    • Optionaloptions: FileSharesCreateOptionalParams

      The options parameters.

    Returns Promise<FileShare>

  • Deletes specified share under its account.

    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.

    • Optionaloptions: FileSharesDeleteOptionalParams

      The options parameters.

    Returns Promise<void>

  • Gets properties of a specified share.

    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.

    • Optionaloptions: FileSharesGetOptionalParams

      The options parameters.

    Returns Promise<FileShare>

  • 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.

    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.

    • Optionaloptions: FileSharesLeaseOptionalParams

      The options parameters.

    Returns Promise<FileSharesLeaseResponse>

  • Lists all shares.

    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.

    • Optionaloptions: FileSharesListOptionalParams

      The options parameters.

    Returns PagedAsyncIterableIterator<FileShareItem>

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

    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.

    • Optionaloptions: FileSharesRestoreOptionalParams

      The options parameters.

    Returns Promise<void>

  • 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.

    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.

    • Optionaloptions: FileSharesUpdateOptionalParams

      The options parameters.

    Returns Promise<FileShare>