Giter Club home page Giter Club logo

azure / azmultiprotocolaccess Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.5K 4.0 263 KB

AzMultiProtocolAccess is a sample application designed to showcase how to use Multi-protocol access on Azure Data Lake Storage Gen2.

Home Page: https://learn.microsoft.com/en-us/samples/azure/azmultiprotocolaccess/azmultiprotocolaccess/

License: MIT License

C# 100.00%
azure azure-blob azure-blob-storage azure-storage azureblobstorage azurestorage mpa storage

azmultiprotocolaccess's Introduction

page_type name topic description languages products urlFragment
sample
AzMultiProtocolAccess
sample
AzMultiProtocolAccess is a sample application designed to showcase how to use Multi-protocol access on Azure Data Lake Storage Gen2.
csharp
azure
azure-blob-storage
azmultiprotocolaccess

Azure Storage Multi-protocol access

AzMultiProtocolAccess is a sample application designed to showcase how to use Multi-protocol access on Azure Data Lake Storage Gen2. The following actions will be performed in sequence:

  • Generating Fake Data
  • Uploading files using Azure DFS API
  • Listing files using Azure Blob API using a PageSize
  • Downloading files using Azure Blob API
  • Uploading files using Azure Blob API and keeping folder structure
  • Listing files using Azure DFS API
  • Downloading files and creating folder structure locally using Azure DFS API

Contents

File/folder Description
src Sample source code.
.gitignore Define what to ignore at commit time.
CONTRIBUTING.md Guidelines for contributing to the sample.
README.md This README file.
LICENSE The license for the sample.

Prerequisites

To use this sample, you need to have an Azure subscription. If you do not have an Azure subscription, you can create a free account before you begin. For more information, see Create an Azure free account.

All access to Azure Storage takes place through a storage account. For this sample, create a storage account using the Azure portal, Azure PowerShell, or Azure CLI. For help creating a storage account, see Create a storage account and enable hierarchical namespace for Multi-protocol access.

For authentication, Azure Active Directory is used. In this sample read and write operations are performed on a storage account. To grant access to the storage account, you need to grant your Identity at least "Storage Blob Data Contributor" privileges. For more information, see Authorize access to Azure blobs and queues using Azure Active Directory.

Using Azure CLI

# Create Ressource Group 
az group create -n rgAzMultiProtocolAccess -l westeurope

# Create Storage Account with Hierarchical Namespace enabled
az storage account create --name YourAccountName \
--resource-group rgAzMultiProtocolAccess --location westeurope \
--sku Standard_LRS --enable-hierarchical-namespace

# Add Role Assignment and grant your Identity "Storage Blob Data Contributor" privileges
az role assignment create --assignee "[email protected]" \
--role "Storage Blob Data Contributor" \
--scope "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgAzMultiProtocolAccess/providers/Microsoft.Storage/storageAccounts/YourAccountName"

Setup

Option one

Before running the sample, you must change "YourAccountName" in the src/Program.cs file (line 11) to the name of your storage account created in the step before.

private static readonly string storageAccountName = "YourAccountName";

Option two

Assign the storage account name as a command line argument when running the sample.

dotnet run YourAccountName

Running the sample

To build and run the sample, change to the src directory and execute the following command:

dotnet run

Key concepts

For more information about Multi-protocol access, see the following articles:

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

azmultiprotocolaccess's People

Contributors

dependabot[bot] avatar derdanu avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.