AZ-204 Develop Azure compute solutions • Complete Question Bank
Complete AZ-204 Develop Azure compute solutions question bank — all 0 questions with answers and detailed explanations.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag steps to the numbered slots on the right, or tap a step then tap a slot.
Drag a concept onto its matching description — or click a concept then click the description.
NoSQL globally distributed database
Serverless compute for event-driven apps
Workflow automation and integration
Enterprise message broker with queues and topics
Event routing service for pub/sub
Drag a concept onto its matching description — or click a concept then click the description.
Securely store and manage secrets, keys, and certificates
Cloud workload protection with threat detection
Enforce organizational standards and compliance rules
Fine-grained access management for Azure resources
Refer to the exhibit.
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2023-01-01",
"name": "[concat(parameters('siteName'), '/appsettings')]",
"properties": {
"WEBSITE_RUN_FROM_PACKAGE": "1",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"AzureWebJobsStorage": "[concat('DefaultEndpointsProtocol=https;AccountName=', parameters('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName')), '2023-01-01').keys[0].value, ';EndpointSuffix=core.windows.net')]"
}
}Refer to the exhibit.
{
"type": "Microsoft.Web/sites",
"apiVersion": "2023-01-01",
"name": "[parameters('webAppName')]",
"kind": "app",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]",
"siteConfig": {
"alwaysOn": true,
"http20Enabled": true,
"minTlsVersion": "1.2",
"ftpsState": "FtpsOnly"
}
}
}Refer to the exhibit.
```json
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('siteName'), '/web')]",
"properties": {
"cors": {
"allowedOrigins": [
"https://app.contoso.com",
"https://portal.contoso.com"
],
"supportCredentials": false
}
}
}
```Refer to the exhibit.
```json
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('siteName'), '/config')]",
"properties": {
"alwaysOn": true,
"http20Enabled": true,
"minTlsVersion": "1.2",
"ftpsState": "FtpsOnly",
"healthCheckPath": "/health"
}
}
```Refer to the exhibit.
```json
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('siteName'), '/config')]",
"properties": {
"connectionStrings": [
{
"name": "DefaultConnection",
"connectionString": "[concat('Server=tcp:', parameters('sqlServerName'), '.database.windows.net,1433;Initial Catalog=', parameters('sqlDatabaseName'), ';Persist Security Info=False;User ID=', parameters('sqlLogin'), ';Password=', parameters('sqlPassword'), ';MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;')]",
"type": "SQLAzure"
}
]
}
}
```Refer to the exhibit.
```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"webAppName": {
"type": "string",
"defaultValue": "myWebApp"
}
},
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"name": "[parameters('webAppName')]",
"location": "[resourceGroup().location]",
"properties": {
"siteConfig": {
"appSettings": [
{
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1"
}
]
}
}
}
]
}
```Refer to the exhibit.
```json
{
"name": "myApp",
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"location": "westus",
"properties": {
"serverFarmId": "/subscriptions/{sub-id}/resourceGroups/myRG/providers/Microsoft.Web/serverfarms/myPlan",
"siteConfig": {
"appSettings": [
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "1234-5678"
}
]
},
"identity": {
"type": "SystemAssigned"
}
},
"dependsOn": [
"[resourceId('Microsoft.OperationalInsights/workspaces', 'myWorkspace')]"
]
}
```Refer to the exhibit.
```json
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-09-01",
"name": "myApp/connectionstrings",
"properties": {
"DefaultConnection": {
"value": "Server=tcp:myserver.database.windows.net;Database=mydb;User ID=myuser;Password=mypassword;Encrypt=True;",
"type": "SQLAzure"
}
}
}
```Refer to the exhibit.
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-09-01",
"name": "appsettings",
"properties": {
"WEBSITE_RUN_FROM_PACKAGE": "1",
"APPINSIGHTS_INSTRUMENTATIONKEY": "<key>",
"MyApp:Setting1": "Value1"
}
}Refer to the exhibit.
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"name": "myAppService",
"location": "[resourceGroup().location]",
"kind": "app",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', 'myPlan')]"
}
}
]
}{
"type": "Microsoft.Web/sites/slots",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('siteName'), '/', parameters('slotName'))]",
"location": "[resourceGroup().location]",
"properties": {
"serverFarmId": "[parameters('hostingPlanId')]",
"siteConfig": {
"appSettings": [
{
"name": "DEPLOYMENT_SLOT",
"value": "[parameters('slotName')]"
}
]
}
}
}public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req,
[Blob("samples-workitems/{rand-guid}", FileAccess.Write)] Stream blobStream,
ILogger log)
{
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
byte[] bytes = Encoding.UTF8.GetBytes(requestBody);
await blobStream.WriteAsync(bytes, 0, bytes.Length);
return new OkResult();
}{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-09-01",
"name": "authsettings",
"properties": {
"enabled": true,
"defaultProvider": "AzureActiveDirectory",
"issuer": "https://login.microsoftonline.com/{tenant-id}/v2.0",
"clientId": "xxx",
"allowedAudiences": ["https://myapp.azurewebsites.net"],
"loginParameters": ["scope=openid profile email"]
}
}{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-09-01",
"name": "myapp",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', 'myplan')]"
}
}
]
}Resources | where type == 'microsoft.insights/components' | where name contains 'myapp'
Your company has an Azure Kubernetes Service (AKS) cluster that hosts multiple microservices. You are tasked with deploying a new microservice that processes incoming HTTP requests and publishes messages to an Azure Service Bus topic. The microservice must scale based on the number of messages in the topic, and it must support graceful shutdown to complete in-flight requests. You need to choose the appropriate compute platform. The microservice is stateless and can be containerized. You want to minimize operational overhead and cost. The solution must automatically scale to zero when there are no messages. Which option should you choose?
Option A: Deploy the microservice as an Azure Function with a Service Bus trigger on the Consumption plan. Option B: Deploy the microservice as a container in AKS with a Horizontal Pod Autoscaler based on Service Bus queue length. Option C: Deploy the microservice as an Azure Container App with a Service Bus scale rule. Option D: Deploy the microservice as an Azure App Service WebJob with continuous mode.
You are developing a web application that allows users to upload images. The application is deployed on Azure App Service. After upload, the images must be processed to generate thumbnails and to extract metadata. The processing should happen asynchronously and must be resilient to failures. You need to design the solution using serverless components. The solution must minimize latency for the user during upload, and the processing must be retried automatically if it fails. You also need to ensure that the processing is idempotent, so that duplicate messages do not cause duplicate thumbnails. Which approach should you use?
Option A: Use Azure Functions with a Blob Storage trigger to process each image as it is uploaded. The function generates thumbnails and stores metadata in Cosmos DB. Use the `leaseBlob` property to prevent duplicate processing. Option B: Use Azure Functions with an Event Grid trigger to process images. The function generates thumbnails and stores metadata in Cosmos DB. Use Event Grid's built-in retry policy and idempotent logic in the function. Option C: Use Azure Logic Apps with a Blob Storage connector to process images. The logic app generates thumbnails and stores metadata in Cosmos DB. Configure retry policy on the connector. Option D: Use Azure Functions with a Service Bus queue trigger. The web app sends a message to the queue after upload. The function processes the message, generates thumbnails, and stores metadata. Use message deduplication to ensure idempotency.
{
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-03-01",
"name": "[parameters('siteName')]",
"location": "[resourceGroup().location]",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('hostingPlanName'))]",
"siteConfig": {
"alwaysOn": true,
"linuxFxVersion": "DOTNETCORE|6.0",
"appSettings": [
{
"name": "WEBSITE_RUN_FROM_PACKAGE",
"value": "1"
}
]
}
}
}
]
}