Table of Contents
- Introduction
- Prerequisites
- Step 1: Create a storage container, upload a file to it, and change the access tier.
- Step 2: Create a file share.
- Step 3: Create a shared access signature token.
- Step 4: Rotate access keys.
- Conclusion
Introduction
In this part of the series, we will complete several tasks like creating a container, creating a file share, uploading files, and managing the access using tokens. These tasks are for managing the storage account and its components.
Prerequisite
To successfully complete the tasks in this project, you need to
- Login to Microsoft Azure portal.
- Complete the previous articles in the series.
- Basic understanding of storage accounts.
Step 1: Create a storage container, upload a file to it, and change the access tier.
- From the Azure portal home page, in the search box, enter storage accounts.
- Select storage accounts under services.
- Select the storage account you created in the Prepare exercise. The storage account name is the hyperlink to the storage account. Remember, it should be associated with the
management-tasks-rg.
- On the storage account blade, under the Data storage submenu, select Containers.
- Select + Add container.
- In the Name field, enter
storage-container. - Select Create.
- Select the storage container you just created.
- Select Upload and upload the file you prepared.
- Once the file is ready for upload, select Upload.
- Select the file you just uploaded (the file name is a hyperlink).
- Select Change tier.
- Select Cold.
- Select Save.
-
Select Home to return to the Azure portal home page.
Note: You just changed the access tier for an individual blob or file. To change the default access tier for all blobs within the storage account, you could change it at the storage account level.
Step 2: Create a file share.
- Reopen the storage account.
- On the storage account blade, under the Data storage submenu, select File shares.
-
Select + File share.
Note: its ok to select classic file share if that is what pops up for you.
- On the Basics tab in the name field, enter
file-share.
- On the Backup tab, uncheck Enable backup.
- Select Review + create.
- Select Create.
- Once the file share is created, select Upload.
- Upload the same file you uploaded to the blob storage or a different file; itβs up to you.
- Select Home to return to the Azure portal home page.
Step 3: Create a shared access signature token.
- Reopen the storage account you created in the Prepare exercise.
- On the storage account blade, select Storage browser.
-
Expand Blob containers.
Note: Blob container is another name for the storage containers. Items uploaded to a storage container are called blobs.
Select the storage container you created earlier, storage-container.
Select the ellipses (three dots) on the end of the line for the image you uploaded or just right-click on it.
-
Select Generate SAS.
Note: When you generate a shared access signature, you set the duration. Once the duration is over, the link stops working. The **Start automatically populates with the current date and time.
Set Signing method to Account key.
-
Set Signing key to Key 1.
Tip: There are two signing keys available. You can choose either one, or create SAS tokens with different durations.
Set Stored access policy to None.
Set Permissions to Read.
Enter a custom start and expiry time or leave the defaults.
- Set Allowed protocols to HTTPS only.
- Select Generate SAS token and URL.
- Copy the Blob SAS URL and paste it in another window or tab of your browser. It should display the image you uploaded. Keep this tab or window open.
> **Tip:** You can configure SAS tokens for files shares and blob containers using the same process.
- Select Home to return to the Azure portal home page.
Step 4: Rotate access keys.
- Reopen the storage account.
- Expand the Security + networking submenu.
- Select Access keys.
- For Key 1, select Rotate key.
- Read and then acknowledge the warning about regenerating the access key by selecting Yes.
- Once you see the success message for rotating the access key, go back to the window or tab you used to check the SAS token and refresh the page. You should receive an authentication failed error.
Conclusion
Congratulations! Youβve successfully carried out tasks to manage the storage account. Now let's move on to the next part where we manage tags and locks.
Thank you for reading my blog. ππ
If you need further assistance, feel free to reach out in the comments or hit me up on Twitter. You can also follow me on GitHub. My DMs are open, and love discussions on cloud topics as always! π
Oluwatofunmi Emmanuel Oluwaloseyi















Top comments (0)