|
| 1 | +# Azure Storage Data Movement File Shares client library for .NET |
| 2 | + |
| 3 | +> Server Version: 2020-04-08, 2020-02-10, 2019-12-12, 2019-07-07, and 2020-02-02 |
| 4 | +
|
| 5 | +Azure Storage is a Microsoft-managed service providing cloud storage that is |
| 6 | +highly available, secure, durable, scalable, and redundant. Azure Storage |
| 7 | +includes Azure Blobs (objects), Azure Data Lake Storage Gen2, Azure Files, |
| 8 | +and Azure Queues. |
| 9 | + |
| 10 | +The Azure Storage Data Movement library is optimized for uploading, downloading and |
| 11 | +copying customer data. |
| 12 | + |
| 13 | +The Azure.Storage.DataMovement.Files.Shares library provides infrastructure shared by the other |
| 14 | +Azure Storage client libraries. |
| 15 | + |
| 16 | +[Source code][source] | [Package (NuGet)][package] | [API reference documentation][docs] | [REST API documentation][rest_docs] | [Product documentation][product_docs] |
| 17 | + |
| 18 | +## Getting started |
| 19 | + |
| 20 | +### Install the package |
| 21 | + |
| 22 | +Install the Azure Storage client library for .NET you'd like to use with |
| 23 | +[NuGet][nuget] and the `Azure.Storage.DataMovement.Files.Shares` client library will be included: |
| 24 | + |
| 25 | +```dotnetcli |
| 26 | +dotnet add package Azure.Storage.DataMovement --prerelease |
| 27 | +dotnet add package Azure.Storage.DataMovement.Files.Shares --prerelease |
| 28 | +``` |
| 29 | + |
| 30 | +### Prerequisites |
| 31 | + |
| 32 | +You need an [Azure subscription][azure_sub] and a |
| 33 | +[Storage Account][storage_account_docs] to use this package. |
| 34 | + |
| 35 | +To create a new Storage Account, you can use the [Azure Portal][storage_account_create_portal], |
| 36 | +[Azure PowerShell][storage_account_create_ps], or the [Azure CLI][storage_account_create_cli]. |
| 37 | +Here's an example using the Azure CLI: |
| 38 | + |
| 39 | +```Powershell |
| 40 | +az storage account create --name MyStorageAccount --resource-group MyResourceGroup --location westus --sku Standard_LRS |
| 41 | +``` |
| 42 | + |
| 43 | +### Authenticate the client |
| 44 | +The Azure.Storage.DataMovement.Files.Shares library uses clients from the Azure.Storage.Files.Shares package to communicate with the Azure File Storage service. For more information see the Azure.Storage.Files.Shares [authentication documentation](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/storage/Azure.Storage.Files.Shares#authenticate-the-client). |
| 45 | + |
| 46 | +## Key concepts |
| 47 | + |
| 48 | +The Azure Storage Common client library contains shared infrastructure like |
| 49 | +[authentication credentials][auth_credentials] and [RequestFailedException][RequestFailedException]. |
| 50 | + |
| 51 | +### Thread safety |
| 52 | +We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads. |
| 53 | + |
| 54 | +### Additional concepts |
| 55 | +<!-- CLIENT COMMON BAR --> |
| 56 | +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | |
| 57 | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) | |
| 58 | +[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) | |
| 59 | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | |
| 60 | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) | |
| 61 | +[Mocking](https://learn.microsoft.com/dotnet/azure/sdk/unit-testing-mocking) | |
| 62 | +[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/) |
| 63 | +<!-- CLIENT COMMON BAR --> |
| 64 | + |
| 65 | +## Examples |
| 66 | + |
| 67 | +This section demonstrates usage of Data Movement for interacting with blob storage. |
| 68 | + |
| 69 | + |
| 70 | +### Initializing File Storage `StorageResource` |
| 71 | + |
| 72 | +***TODO*** |
| 73 | + |
| 74 | +### Upload |
| 75 | + |
| 76 | +***TODO*** |
| 77 | + |
| 78 | +### Download |
| 79 | + |
| 80 | +***TODO*** |
| 81 | + |
| 82 | +### File Copy |
| 83 | + |
| 84 | +***TODO*** |
| 85 | + |
| 86 | +## Troubleshooting |
| 87 | + |
| 88 | +***TODO*** |
| 89 | + |
| 90 | +## Next steps |
| 91 | + |
| 92 | +***TODO*** |
| 93 | + |
| 94 | +## Contributing |
| 95 | + |
| 96 | +See the [Storage CONTRIBUTING.md][storage_contrib] for details on building, |
| 97 | +testing, and contributing to these libraries. |
| 98 | + |
| 99 | +This project welcomes contributions and suggestions. Most contributions require |
| 100 | +you to agree to a Contributor License Agreement (CLA) declaring that you have |
| 101 | +the right to, and actually do, grant us the rights to use your contribution. For |
| 102 | +details, visit [cla.microsoft.com][cla]. |
| 103 | + |
| 104 | +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. |
| 105 | +For more information see the [Code of Conduct FAQ][coc_faq] |
| 106 | +or contact [[email protected]][coc_contact] with any |
| 107 | +additional questions or comments. |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | +<!-- LINKS --> |
| 112 | +[source]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/storage/Azure.Storage.Common/src |
| 113 | +[package]: https://www.nuget.org/packages/Azure.Storage.Common/ |
| 114 | +[docs]: https://docs.microsoft.com/dotnet/api/azure.storage |
| 115 | +[rest_docs]: https://docs.microsoft.com/rest/api/storageservices/ |
| 116 | +[product_docs]: https://docs.microsoft.com/azure/storage/ |
| 117 | +[nuget]: https://www.nuget.org/ |
| 118 | +[storage_account_docs]: https://docs.microsoft.com/azure/storage/common/storage-account-overview |
| 119 | +[storage_account_create_ps]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-powershell |
| 120 | +[storage_account_create_cli]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-cli |
| 121 | +[storage_account_create_portal]: https://docs.microsoft.com/azure/storage/common/storage-quickstart-create-account?tabs=azure-portal |
| 122 | +[azure_cli]: https://docs.microsoft.com/cli/azure |
| 123 | +[azure_sub]: https://azure.microsoft.com/free/dotnet/ |
| 124 | +[RequestFailedException]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/core/Azure.Core/src/RequestFailedException.cs |
| 125 | +[error_codes]: https://docs.microsoft.com/rest/api/storageservices/common-rest-api-error-codes |
| 126 | +[samples]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/storage/Azure.Storage.DataMovement.Blobs/samples |
| 127 | +[storage_contrib]: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/storage/CONTRIBUTING.md |
| 128 | +[cla]: https://cla.microsoft.com |
| 129 | +[coc]: https://opensource.microsoft.com/codeofconduct/ |
| 130 | +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ |
| 131 | +[coc_contact]: mailto:[email protected] |
0 commit comments