Courseiva
Develop for Azure storagehardMultiple ChoiceObjective-mapped

AZ-204 Develop for Azure storage Practice Question

Exhibit

Refer to the exhibit. The following is an Azure CLI command and its output:

az storage account show \
  --name mystorageaccount \
  --resource-group myResourceGroup \
  --query "{kind:kind, accessTier:accessTier, supportsHttpsTrafficOnly:supportsHttpsTrafficOnly}"

Output:
{
  "kind": "StorageV2",
  "accessTier": "Cool",
  "supportsHttpsTrafficOnly": false
}

You have an Azure Storage account configured as shown in the exhibit. You need to ensure that all traffic to the storage account uses HTTPS. Which Azure CLI command should you run next?

⚠ Common exam trap

It's easy for candidates to confuse the `--https-only` parameter with `--secure-transfer-required` or `--enable-https-traffic-only`, which are not valid Azure CLI parameters for the `az storage account update` command, leading them to choose incorrect options that sound plausible but do not exist in the CLI syntax.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

az storage account update --name mystorageaccount --resource-group myResourceGroup --https-only true

The `az storage account update` command with the `--https-only true` parameter enforces HTTPS for all traffic to the storage account by setting the `supportsHttpsTrafficOnly` property to true. This is the specific Azure CLI parameter that controls this setting, and it must be applied after account creation. The command directly meets the requirement to ensure all traffic uses HTTPS.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • az storage account create --name mystorageaccount --resource-group myResourceGroup --https-only true

    Why it's wrong here

    This command is incorrect because `az storage account create` is used for provisioning a *new* storage account, not for modifying an existing one. Attempting to use the `create` command with the name of an already existing storage account will result in an error, as resource names must be unique within a resource group. While `--https-only true` is a valid parameter for initial creation, the command verb itself is inappropriate for an update operation.

  • az storage account update --name mystorageaccount --resource-group myResourceGroup --secure-transfer-required true

    Why it's wrong here

    This command is incorrect because `--secure-transfer-required` is not a valid parameter for the `az storage account update` command in the Azure CLI. Although it semantically relates to enforcing secure communication, the Azure CLI uses a different parameter name to configure this specific setting. Using an unrecognized parameter will cause the command to fail without applying the desired change to the storage account's security configuration.

  • az storage account update --name mystorageaccount --resource-group myResourceGroup --enable-https-traffic-only true

    Why it's wrong here

    This command is incorrect because `--enable-https-traffic-only` is not the correct parameter name for enforcing HTTPS-only traffic on an Azure Storage account via the Azure CLI. While the `update` command is appropriate for modifying an existing resource, the parameter used here is syntactically invalid for this specific configuration. The Azure CLI expects a different, precise parameter name to enable this security feature, and using an incorrect one will prevent the command from executing successfully.

  • az storage account update --name mystorageaccount --resource-group myResourceGroup --https-only true

    Why this is correct

    This command is correct because `az storage account update` is the appropriate command to modify an existing Azure Storage account. The `--https-only true` parameter is the precise and officially recognized flag in the Azure CLI for enforcing that all requests to the storage account must use HTTPS. This action successfully disables unencrypted HTTP access, ensuring all data in transit to and from the storage account is encrypted, aligning with robust security practices.

About these practice questions

This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.