πŸ”

AZ-204 β€” questions

Page 4 of 7 Β· 139 total questions.

Topic 3 Β· Question 119

You develop Azure solutions. A .NET application needs to receive a message each time an Azure virtual machine finishes processing data. The messages must NOT persist after being processed by the receiving application. You need to implement the .NET object that will receive the messages. Which object should you use?

  • AQueueClient (correct answer)
  • BSubscriptionClient
  • CTopicClient
  • DCloudQueueClient
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: QueueClient.

Topic 3 Β· Question 121

You develop Azure solutions. You must connect to a No-SQL globally-distributed database by using the .NET API. You need to create an object to configure and execute requests in the database. Which code segment should you use?

  • Anew Container(EndpointUri, PrimaryKey);
  • Bnew Database(EndpointUri, PrimaryKey);
  • Cnew CosmosClient(EndpointUri, PrimaryKey); (correct answer)
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: new CosmosClient(EndpointUri, PrimaryKey);.

Topic 3 Β· Question 122

You have an existing Azure storage account that stores large volumes of data across multiple containers. You need to copy all data from the existing storage account to a new storage account. The copy process must meet the following requirements: β€’ Automate data movement. β€’ Minimize user input required to perform the operation. β€’ Ensure that the data movement process is recoverable. What should you use?

  • AAzCopy (correct answer)
  • BAzure Storage Explorer
  • CAzure portal
  • D.NET Storage Client Library
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: AzCopy

Explanation

AzCopy is a command-line tool that efficiently copies data to and from Azure Storage.

Topic 3 Β· Question 129 Β· Select all that apply

You are developing an Azure Cosmos DB solution by using the Azure Cosmos DB SQL API. The data includes millions of documents. Each document may contain hundreds of properties. The properties of the documents do not contain distinct values for partitioning. Azure Cosmos DB must scale individual containers in the database to meet the performance needs of the application by spreading the workload evenly across all partitions over time. You need to select a partition key. Which two partition keys can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • Aa single property value that does not appear frequently in the documents
  • Ba value containing the collection name
  • Ca single property value that appears frequently in the documents
  • Da concatenation of multiple property values with a random suffix appended (correct answer)
  • Ea hash suffix appended to a property value (correct answer)
Reveal answer & explanation
Correct answer: D, E

The correct answer is D, E. Option D: a concatenation of multiple property values with a random suffix appended Option E: a hash suffix appended to a property value.

Topic 3 Β· Question 134

You develop and deploy a web application to Azure App Service. The application accesses data stored in an Azure Storage account. The account contains several containers with several blobs with large amounts of data. You deploy all Azure resources to a single region. You need to move the Azure Storage account to the new region. You must copy all data to the new region. What should you do first?

  • AExport the Azure Storage account Azure Resource Manager template (correct answer)
  • BInitiate a storage account failover
  • CConfigure object replication for all blobs
  • DUse the AzCopy command line tool
  • ECreate a new Azure Storage account in the current region
  • FCreate a new subscription in the current region
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Export the Azure Storage account Azure Resource Manager template

Explanation

An Azure Storage Account is the container that groups blob, file, queue, and table storage with unified access control.

Topic 3 Β· Question 138

An organization deploys Azure Cosmos DB. You need to ensure that the index is updated as items are created, updated, or deleted. What should you do?

  • ASet the indexing mode to Lazy.
  • BSet the value of the automatic property of the indexing policy to False.
  • CSet the value of the EnableScanInQuery option to True.
  • DSet the indexing mode to Consistent. (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Set the indexing mode to Consistent.

Topic 3 Β· Question 139 Β· Select all that apply

You are developing a .Net web application that stores data in Azure Cosmos DB. The application must use the Core API and allow millions of reads and writes. The Azure Cosmos DB account has been created with multiple write regions enabled. The application has been deployed to the East US2 and Central US regions. You need to update the application to support multi-region writes. What are two possible ways to achieve this goal? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • AUpdate the ConnectionPolicy class for the Cosmos client and populate the PreferredLocations property based on the geo-proximity of the application. (correct answer)
  • BUpdate Azure Cosmos DB to use the Strong consistency level. Add indexed properties to the container to indicate region.
  • CUpdate the ConnectionPolicy class for the Cosmos client and set the UseMultipleWriteLocations property to true. (correct answer)
  • DCreate and deploy a custom conflict resolution policy.
  • EUpdate Azure Cosmos DB to use the Session consistency level. Send the SessionToken property value from the FeedResponse object of the write action to the end-user by using a cookie.
Reveal answer & explanation
Correct answer: A, C

The correct answer is A, C. Option A: Update the ConnectionPolicy class for the Cosmos client and populate the PreferredLocations property based on the geo-proximity of the application. Option C: Update the ConnectionPolicy class for the Cosmos client and set the UseMultipleWriteLocations property to true.

Topic 3 Β· Question 147 Β· Select all that apply

You are developing an application to store business-critical data in Azure Blob storage. The application must meet the following requirements: β€’ Data must not be modified or deleted for a user-specified interval. β€’ Data must be protected from overwrites and deletes. β€’ Data must be written once and allowed to be read many times. You need to protect the data in the Azure Blob storage account. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • AConfigure a time-based retention policy for the storage account. (correct answer)
  • BCreate an account shared-access signature (SAS).
  • CEnable the blob change feed for the storage account.
  • DEnable version-level immutability support for the storage account. (correct answer)
  • EEnable point-in-time restore for containers in the storage account.
  • FCreate a service shared-access signature (SAS).
Reveal answer & explanation
Correct answer: A, D

The correct answer is A, D. Option A: Configure a time-based retention policy for the storage account. Option D: Enable version-level immutability support for the storage account.

Explanation

An Azure Storage Account is the container that groups blob, file, queue, and table storage with unified access control.

Topic 3 Β· Question 148 Β· Select all that apply

You are updating an application that stores data on Azure and uses Azure Cosmos DB for storage. The application stores data in multiple documents associated with a single username. The application requires the ability to update multiple documents for a username in a single ACID operation. You need to configure Azure Cosmos DB. Which two actions should you perform? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.

  • ACreate a collection sharded on username to store documents.
  • BConfigure Azure Cosmos DB to use the Gremlin API.
  • CCreate an unsharded collection to store documents. (correct answer)
  • DConfigure Azure Cosmos DB to use the MongoDB API. (correct answer)
Reveal answer & explanation
Correct answer: C, D

The correct answer is C, D. Option C: Create an unsharded collection to store documents. Option D: Configure Azure Cosmos DB to use the MongoDB API.

Explanation

Azure Cosmos DB is a globally distributed, multi-model NoSQL database with single-digit millisecond latency and automatic scaling.

Topic 3 Β· Question 149

You develop Azure solutions. You must connect to a No-SQL globally-distributed database by using the .NET API. You need to create an object to configure and execute requests in the database. Which code segment should you use?

  • Adatabase_name = 'MyDatabase' database = client.create_database_if_not_exists(id=database_name)
  • Bclient = CosmosClient(endpoint, key) (correct answer)
  • Ccontainer_name = 'MyContainer' container = database.create_container_if_not_exists( id=container_name, partition_key=PartitionKey(path="/lastName"), offer_throughput=400 )
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: client = CosmosClient(endpoint, key).

Topic 3 Β· Question 150 Β· Select all that apply

You develop a web application that provides access to legal documents that are stored on Azure Blob Storage with version-level immutability policies. Documents are protected with both time-based policies and legal hold policies. All time-based retention policies have the AllowProtectedAppendWrites property enabled. You have a requirement to prevent the user from attempting to perform operations that would fail only when a legal hold is in effect and when all other policies are expired. You need to meet the requirement. Which two operations should you prevent? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • Aadding data to documents
  • Bdeleting documents (correct answer)
  • Ccreating documents
  • Doverwriting existing documents (correct answer)
Reveal answer & explanation
Correct answer: B, D

The correct answer is B, D. Option B: deleting documents Option D: overwriting existing documents.

Topic 3 Β· Question 155

You are developing an inventory tracking solution. The solution includes an Azure Function app containing multiple functions triggered by Azure Cosmos DB. You plan to deploy the solution to multiple Azure regions. The solution must meet the following requirements: β€’ Item results from Azure Cosmos DS must return the most recent committed version of an item. β€’ Items written to Azure Cosmos DB must provide ordering guarantees. You need to configure the consistency level for the Azure Cosmos DB deployments. Which consistency level should you use?

  • Aconsistent prefix
  • Beventual
  • Cbounded staleness
  • Dstrong (correct answer)
  • Esession
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: strong.

Topic 3 Β· Question 158

You create and publish a new Azure App Service web app. User authentication and authorization must use Azure Active Directory (Azure AD). You need to configure authentication and authorization. What should you do first?

  • AAdd an identity provider. (correct answer)
  • BMap an existing custom DNS name.
  • CCreate and configure a new app setting.
  • DAdd a private certificate.
  • ECreate and configure a managed identity.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Add an identity provider.

Topic 3 Β· Question 160

You have a Linux container-based console application that uploads image files from customer sites all over the world. A back-end system that runs on Azure virtual machines processes the images by using the Azure Blobs API. You are not permitted to make changes to the application. Some customer sites only have phone-based internet connections. You need to configure the console application to access the images. What should you use?

  • AAzure BlobFuse (correct answer)
  • BAzure Disks
  • CAzure Storage Network File System (NFS) 3.0 support
  • DAzure Files
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Azure BlobFuse.

Topic 3 Β· Question 164

You create an Azure Cosmos DB for NoSQL database. You plan to use the Azure Cosmos DB .NET SDK v3 API for NoSQL to upload the following files: You receive the following error message when uploading the files: β€œ413 Entity too large”. You need to determine which files you can upload to the Azure Cosmos DB for NoSQL database. Which files can you upload?

Exhibit 1 for question 164
  • AFile1, File2, File3, File4, and File5
  • BFile1 and File2 only (correct answer)
  • CFile1, File2, and File3 only
  • DFile1, File2, File3, and File4 only
  • EFile1 only
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: File1 and File2 only.

Topic 3 Β· Question 165

You are developing an app to store globally distributed data in several Azure Blob Storage containers. Each container hosts multiple blobs where each instance of the app will store the data. You enable versioning and soft delete for the blobs. App testing and incorrect code have frequently corrupted data. Development of the app must allow data to be restored to a previous day for testing. You need to configure the storage account to support point-in-time restore. What should you do?

  • AEnable the change feed on the storage account to begin capturing and recording changes. (correct answer)
  • BConfigure object replication and specify replication rules.
  • CCreate a snapshot of the blob in the hot tier.
  • DConfigure an immutability policy that is scoped to a blob version.
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Enable the change feed on the storage account to begin capturing and recording changes.

Explanation

An Azure Storage Account is the container that groups blob, file, queue, and table storage with unified access control.

Topic 3 Β· Question 166

A company uses an Azure Blob Storage for archiving. The company requires that data in the Blob Storage is only in the archive tier. You need to ensure data copied to the Blob Storage is moved to the archive tier. What should you do?

  • AUse a Put Block List operation with a request header of x-ms-immutability-policy-mode.
  • BCreate a lifecycle policy with an action of tierToArchive and configure daysAfterModificationGreaterThan for 0. (correct answer)
  • CUse a Put Blob operation with a request header of x-ms-immutability-policy-until-date.
  • DCreate a lifecycle policy with an action of tierToArchive and configure a filter for blobIndexMatch.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Create a lifecycle policy with an action of tierToArchive and configure daysAfterModificationGreaterThan for 0.

Topic 3 Β· Question 169

You are developing a Cosmos DB solution that will be deployed to multiple Azure regions. Your solution must meet the following requirements: β€’ Read operations will never receive write operations that are out of order. β€’ Maximize concurrency of read operations in all regions. You need to choose the consistency level for the solution. Which consistency level should you use?

  • Asession
  • Beventual
  • Cbounded staleness
  • Dconsistent prefix (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: consistent prefix.

Topic 3 Β· Question 170 Β· Select all that apply

You have an Azure Queue Storage named queue1. You plan to develop code that will process messages in queue1. You need to implement a queue operation to set the visibility timeout value of individual messages in queue1. Which two operations can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

  • APeek at a message in the queue.
  • BDelete a message in the queue.
  • CAdd a message to the queue.
  • DUpdate a message in the queue. (correct answer)
  • EReceive a message from the queue. (correct answer)
Reveal answer & explanation
Correct answer: D, E

The correct answer is D, E. Option D: Update a message in the queue. Option E: Receive a message from the queue.

Topic 3 Β· Question 176

Case study - This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided. To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study. At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section. To start the case study - To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Question button to return to the question. Background - Fourth Coffee is a global coffeehouse chain and coffee company recognized as one of the world’s most influential coffee brands. The company is renowned for its specialty coffee beverages, including a wide range of espresso-based drinks, teas, and other beverages. Fourth Coffee operates thousands of stores worldwide. Current environment - The company is developing cloud-native applications hosted in Azure. Corporate website - The company hosts a public website located at http://www.fourthcoffee.com/. The website is used to place orders as well as view and update inventory items. Inventory items - In addition to its core coffee offerings, Fourth Coffee recently expanded its menu to include inventory items such as lunch items, snacks, and merchandise. Corporate team members constantly update inventory. Users can customize items. Corporate team members configure inventory items and associated images on the website. Orders - Associates in the store serve customized beverages and items to customers. Orders are placed on the website for pickup. The application components process data as follows: 1. Azure Traffic Manager routes a user order request to the corporate website hosted in Azure App Service. 2. Azure Content Delivery Network serves static images and content to the user. 3. The user signs in to the application through a Microsoft Entra ID for customers tenant. 4. Users search for items and place an order on the website as item images are pulled from Azure Blob Storage. 5. Item customizations are placed in an Azure Service Bus queue message. 6. Azure Functions processes item customizations and saves the customized items to Azure Cosmos DB. 7. The website saves order details to Azure SQL Database. 8. SQL Database query results are cached in Azure Cache for Redis to improve performance. The application consists of the following Azure services: Requirements - The application components must meet the following requirements: β€’ Azure Cosmos DB development must use a native API that receives the latest updates and stores data in a document format. β€’ Costs must be minimized for all Azure services. β€’ Developers must test Azure Blob Storage integrations locally before deployment to Azure. Testing must support the latest versions of the Azure Storage APIs. Corporate website - β€’ User authentication and authorization must allow one-time passcode sign-in methods and social identity providers (Google or Facebook). β€’ Static web content must be stored closest to end users to reduce network latency. Inventory items - β€’ Customized items read from Azure Cosmos DB must maximize throughput while ensuring data is accurate for the current user on the website. β€’ Processing of inventory item updates must automatically scale and enable updates across an entire Azure Cosmos DB container. β€’ Inventory items must be processed in the order they were placed in the queue. β€’ Inventory item images must be stored as JPEG files in their native format to include exchangeable image file format (data) stored with the blob data upon upload of the image file. β€’ The Inventory Items API must securely access the Azure Cosmos DB data. Orders - β€’ Orders must receive inventory item changes automatically after inventory items are updated or saved. Issues - β€’ Developers are storing the Azure Cosmos DB credentials in an insecure clear text manner within the Inventory Items API code. β€’ Production Azure Cache for Redis maintenance has negatively affected application performance. You need to support local development testing for developers. Which tool should you use?

Exhibit 1 for question 176
  • AAzurite (correct answer)
  • BAzure Storage Emulator
  • CSQL Server Management Studio (SSMS)
  • DAzure Storage Explorer
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Azurite.

Showing questions 61–80 of 139 Β· Page 4 of 7