Bird
Raised Fist0
Azurecloud~20 mins

Storage commands in Azure - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Azure Storage Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ service_behavior
intermediate
2:00remaining
Understanding Azure Blob Storage Container Creation
You run the command to create a new blob container in Azure Storage:

az storage container create --name mycontainer --account-name mystorageaccount --public-access blob

What is the effect of the --public-access blob option?
AThe container and all blobs inside are publicly readable without authentication.
BOnly the blobs inside the container are publicly readable, but the container metadata is private.
CThe container is private and requires authentication for all access.
DThe container is publicly writable but not readable.
Attempts:
2 left
💡 Hint
Think about what 'blob' level public access means compared to 'container' level.
❓ Configuration
intermediate
2:00remaining
Correct Azure CLI Command to Upload a File to Blob Storage
Which Azure CLI command correctly uploads a local file named report.pdf to a blob container named documents in the storage account mystorage?
Aaz storage container upload --name documents --file report.pdf --account-name mystorage
Baz storage blob upload-file --container documents --file report.pdf --account mystorage
Caz storage blob upload --container-name documents --file report.pdf --name report.pdf --account-name mystorage
Daz storage blob put --container documents --file report.pdf --account-name mystorage
Attempts:
2 left
💡 Hint
Check the exact command and parameter names for uploading blobs.
❓ Architecture
advanced
2:00remaining
Choosing Storage Account Type for High Transaction Workloads
You need to design an Azure Storage solution for an application with very high transaction rates and low latency requirements. Which storage account type should you choose?
APremium block blob storage account
BBlob storage account with cool access tier
CGeneral-purpose v1 storage account
DGeneral-purpose v2 (GPv2) storage account with standard performance
Attempts:
2 left
💡 Hint
Consider performance tiers and latency for storage accounts.
❓ security
advanced
2:00remaining
Effect of Enabling Soft Delete on Azure Blob Storage
What happens when you enable soft delete on an Azure Blob Storage container?
ADeleted blobs are retained for a configurable period and can be restored during that time.
BDeleted blobs are permanently removed immediately and cannot be recovered.
CBlobs cannot be deleted while soft delete is enabled.
DSoft delete encrypts blobs automatically at rest.
Attempts:
2 left
💡 Hint
Think about what 'soft delete' means in data protection.
✅ Best Practice
expert
2:00remaining
Optimizing Azure Storage Costs for Infrequently Accessed Data
You have large amounts of data that are rarely accessed but must be retained for compliance. Which Azure Storage strategy best balances cost and accessibility?
AStore data in a general-purpose v2 account using the hot access tier.
BStore data in a premium block blob storage account with cool access tier.
CStore data in a general-purpose v1 account with standard performance.
DStore data in a blob storage account using the archive access tier.
Attempts:
2 left
💡 Hint
Consider access frequency and cost trade-offs of storage tiers.

Practice

(1/5)
1. What does the Azure CLI command az storage account create do?
easy
A. Lists all storage accounts in your subscription
B. Deletes an existing storage account
C. Creates a new storage account in Azure
D. Uploads a file to a storage container

Solution

  1. Step 1: Understand the command purpose

    The command az storage account create is used to create a new storage account in Azure.
  2. Step 2: Compare with other options

    Other options describe deleting, listing, or uploading, which are different commands.
  3. Final Answer:

    Creates a new storage account in Azure -> Option C
  4. Quick Check:

    Create storage account = Creates new account [OK]
Hint: Create means make new storage account [OK]
Common Mistakes:
  • Confusing create with delete
  • Thinking it lists accounts
  • Mixing upload with account creation
2. Which of the following is the correct syntax to list blobs in a container using Azure CLI?
easy
A. az storage account list --container mycontainer
B. az storage blob list --container-name mycontainer
C. az storage blob upload --container mycontainer
D. az storage container list --blob-name myblob

Solution

  1. Step 1: Identify the command to list blobs

    The command to list blobs is az storage blob list with the container name specified.
  2. Step 2: Check option syntax correctness

    az storage blob list --container-name mycontainer uses correct command and parameter --container-name. Other options misuse commands or parameters.
  3. Final Answer:

    az storage blob list --container-name mycontainer -> Option B
  4. Quick Check:

    List blobs = az storage blob list [OK]
Hint: List blobs uses 'az storage blob list' with container name [OK]
Common Mistakes:
  • Using container list instead of blob list
  • Mixing upload command with list
  • Wrong parameter names
3. What will be the output of the following command if the container photos has three blobs named img1.jpg, img2.jpg, and img3.jpg?
az storage blob list --container-name photos --output table
medium
A. A table listing img1.jpg, img2.jpg, img3.jpg blobs
B. An error saying container not found
C. A list of storage accounts
D. An empty list with no blobs

Solution

  1. Step 1: Understand the command and container contents

    The command lists blobs in the container named 'photos'. The container has three blobs: img1.jpg, img2.jpg, img3.jpg.
  2. Step 2: Predict the output format

    The --output table option formats the output as a table showing blob names.
  3. Final Answer:

    A table listing img1.jpg, img2.jpg, img3.jpg blobs -> Option A
  4. Quick Check:

    List blobs with table output = table of blob names [OK]
Hint: List blobs shows all files in container as table [OK]
Common Mistakes:
  • Expecting error when container exists
  • Confusing blobs with storage accounts
  • Assuming empty output incorrectly
4. You run the command az storage blob upload --container-name docs --file report.pdf but get an error. What is the most likely cause?
medium
A. The file report.pdf does not exist locally
B. The command syntax is incorrect
C. The container docs does not exist
D. Missing the storage account connection string or credentials

Solution

  1. Step 1: Check command requirements

    The upload command requires authentication details like connection string or account key to access storage.
  2. Step 2: Analyze common error causes

    Missing credentials is the most common cause of upload failure, even if file and container exist.
  3. Final Answer:

    Missing the storage account connection string or credentials -> Option D
  4. Quick Check:

    Upload error usually means missing credentials [OK]
Hint: Upload needs credentials; missing them causes errors [OK]
Common Mistakes:
  • Assuming file missing without checking
  • Ignoring authentication requirements
  • Thinking syntax is wrong when it is correct
5. You want to automate backing up files from your local folder backup to an Azure blob container named backup-container. Which sequence of commands correctly achieves this?
hard
A. 1) az storage container create --name backup-container 2) az storage blob upload-batch --source backup --destination backup-container
B. 1) az storage account create --name backup-container 2) az storage blob upload --file backup
C. 1) az storage blob list --container-name backup-container 2) az storage blob download --container-name backup-container
D. 1) az storage container delete --name backup-container 2) az storage blob upload-batch --source backup --destination backup-container

Solution

  1. Step 1: Create the container if it does not exist

    The command az storage container create creates the container named 'backup-container'.
  2. Step 2: Upload all files from local folder to container

    The command az storage blob upload-batch uploads all files from the local 'backup' folder to the container.
  3. Final Answer:

    1) az storage container create --name backup-container 2) az storage blob upload-batch --source backup --destination backup-container -> Option A
  4. Quick Check:

    Create container then batch upload = backup done [OK]
Hint: Create container first, then upload batch files [OK]
Common Mistakes:
  • Trying to upload without container
  • Confusing account creation with container
  • Deleting container before upload
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard