Microsoft AZ-204 QUESTIONS AND ANSWERS |
VERIFIED AND WELL DETAILED ANSWERS | PLUS
RATIONALES | GUARANTEED PASS | LATEST EXAM
UPDATE | EXAM PREP | STUDY GUIDE | PRACTICE
TEST
Domain 1: Develop Azure Compute Solutions (25 Questions)
1. You need to create an Azure Function that runs whenever a new message is added to an Azure Storage
Queue. Which trigger should you use?
A) HTTP Trigger
,B) Timer Trigger
C) Queue Trigger
D) Blob Trigger
Answer: C
Rationale: A Queue Trigger is specifically designed to execute a function in response to a message arriving in
an Azure Storage Queue. HTTP triggers respond to web requests, Timer triggers run on a schedule, and Blob
triggers respond to changes in Blob Storage.
2. You are developing a serverless application. You need to ensure that the application can scale automatically
and you only pay for execution time. Which Azure compute service should you use?
A) Azure Virtual Machines
B) Azure App Service
C) Azure Functions
D) Azure Container Instances
Answer: C
Rationale: Azure Functions is a serverless compute service that provides automatic scaling and a consumption-
based pricing model where you only pay for the time your code runs.
,3. You need to deploy a Docker container to Azure. The container will run a short-lived batch job and does not
require an orchestrator. Which service is the most cost-effective and simplest solution?
A) Azure Kubernetes Service (AKS)
B) Azure Container Instances (ACI)
C) Azure App Service for Containers
D) Azure Virtual Machine Scale Sets
Answer: B
Rationale: Azure Container Instances (ACI) is the fastest and simplest way to run a container in Azure without
managing any virtual machines or adopting a higher-level orchestrator like AKS. It's ideal for short-lived, isolated
tasks.
4. You are creating an Azure Function. You need to configure it to run every 5 minutes. Which type of trigger
should you configure?
A) Queue Trigger
B) Timer Trigger
C) HTTP Trigger
D) Event Hub Trigger
, Answer: B
Rationale: A Timer Trigger allows you to schedule a function to run on a recurring basis using a CRON
expression. To run every 5 minutes, you would use a CRON expression like `0 */5 * * * *`.
5. You need to store a secret that will be used by an Azure Function app to connect to a database. Where
should you store this secret for maximum security?
A) In the application's `local.settings.json` file.
B) In the Azure Function's application settings directly.
C) In Azure Key Vault.
D) In a configuration file within the function's deployment package.
Answer: C
Rationale: Azure Key Vault is a secure, centralized service for managing secrets, keys, and certificates. Using
Key Vault with a managed identity for the Function App is the most secure way to handle secrets, avoiding
hardcoding them in code or configuration files.
6. Which Azure App Service plan tier provides features like deployment slots, custom domains, and SSL
certificates?
VERIFIED AND WELL DETAILED ANSWERS | PLUS
RATIONALES | GUARANTEED PASS | LATEST EXAM
UPDATE | EXAM PREP | STUDY GUIDE | PRACTICE
TEST
Domain 1: Develop Azure Compute Solutions (25 Questions)
1. You need to create an Azure Function that runs whenever a new message is added to an Azure Storage
Queue. Which trigger should you use?
A) HTTP Trigger
,B) Timer Trigger
C) Queue Trigger
D) Blob Trigger
Answer: C
Rationale: A Queue Trigger is specifically designed to execute a function in response to a message arriving in
an Azure Storage Queue. HTTP triggers respond to web requests, Timer triggers run on a schedule, and Blob
triggers respond to changes in Blob Storage.
2. You are developing a serverless application. You need to ensure that the application can scale automatically
and you only pay for execution time. Which Azure compute service should you use?
A) Azure Virtual Machines
B) Azure App Service
C) Azure Functions
D) Azure Container Instances
Answer: C
Rationale: Azure Functions is a serverless compute service that provides automatic scaling and a consumption-
based pricing model where you only pay for the time your code runs.
,3. You need to deploy a Docker container to Azure. The container will run a short-lived batch job and does not
require an orchestrator. Which service is the most cost-effective and simplest solution?
A) Azure Kubernetes Service (AKS)
B) Azure Container Instances (ACI)
C) Azure App Service for Containers
D) Azure Virtual Machine Scale Sets
Answer: B
Rationale: Azure Container Instances (ACI) is the fastest and simplest way to run a container in Azure without
managing any virtual machines or adopting a higher-level orchestrator like AKS. It's ideal for short-lived, isolated
tasks.
4. You are creating an Azure Function. You need to configure it to run every 5 minutes. Which type of trigger
should you configure?
A) Queue Trigger
B) Timer Trigger
C) HTTP Trigger
D) Event Hub Trigger
, Answer: B
Rationale: A Timer Trigger allows you to schedule a function to run on a recurring basis using a CRON
expression. To run every 5 minutes, you would use a CRON expression like `0 */5 * * * *`.
5. You need to store a secret that will be used by an Azure Function app to connect to a database. Where
should you store this secret for maximum security?
A) In the application's `local.settings.json` file.
B) In the Azure Function's application settings directly.
C) In Azure Key Vault.
D) In a configuration file within the function's deployment package.
Answer: C
Rationale: Azure Key Vault is a secure, centralized service for managing secrets, keys, and certificates. Using
Key Vault with a managed identity for the Function App is the most secure way to handle secrets, avoiding
hardcoding them in code or configuration files.
6. Which Azure App Service plan tier provides features like deployment slots, custom domains, and SSL
certificates?