Free DP-420 Exam Braindumps
Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB Questions 31–35 (page: 8)

Updated On: 10-Feb-2026

The settings for a container in an Azure Cosmos DB Core (SQL) API account are con gured as shown in the following exhibit.



Which statement describes the con guration of the container?

  1. All items will be deleted after one year.
  2. Items stored in the collection will be retained always, regardless of the items time to live value.
  3. Items stored in the collection will expire only if the item has a time to live value.
  4. All items will be deleted after one hour.

Answer(s): C

Explanation:

When DefaultTimeToLive is -1 then your Time to Live setting is On (No default) Time to Live on a container, if present and the value is set to "-1", it is equal to in nity, and items don't expire by default.
Time to Live on an item:
This Property is applicable only if DefaultTimeToLive is present and it is not set to null for the parent container.
If present, it overrides the DefaultTimeToLive value of the parent container.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/time-to-live



You have an Azure Cosmos DB Core (SQL) API account named account1 that is con gured for automatic failover. The account1 account has a single read-write region in West US and a read region in East US.
You run the following PowerShell command.
Update-AzCosmosDBAccountFailoverPriority -ResourceGroupName `rg1` -Name `account1` -FailoverPolicy @(`East US`, `West US`)
What is the effect of running the command?

  1. The account will be unavailable to writes during the change
  2. The provisioned throughput for account1 will increase
  3. The account will be con gured for multi-region writes
  4. A manual failover will occur

Answer(s): A

Explanation:

Note: The Update-AzCosmosDBAccountFailoverPriority command updates Failover Region Priority of a CosmosDB Account.
Parameter -FailoverPolicy is an array of strings having region names, ordered by failover priority. E.g eastus, westus


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/high-availability



HOTSPOT (Drag and Drop is not supported).
You are developing an application that will connect to an Azure Cosmos DB Core (SQL) API account. The account has a single read-write region and one additional read region. The regions are con gured for automatic failover. The account has the following connection strings. (Line numbers are included for reference only.)



For each of the following statements, select Yes if the statement is true. Otherwise, select No.
NOTE: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: No
The same connection string can still be used.
Azure Cosmos DB Core read write region connection strings
Azure Cosmos DB "primary write region" failover "connection string"

Box 2: No
The AccountEndpoint for both are the same.

Box 3: Yes
The ConnectionPolicy.PreferredLocations property gets and sets the preferred locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. For example, "East US" as the preferred location.
When EnableEndpointDiscovery is true and the value of this property is non-empty, the SDK uses the locations in the collection in the order they are speci ed to perform operations, otherwise if the value of this property is not speci ed, the SDK uses the write region as the preferred location for all operations.


Reference:

https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.connectionpolicy.preferredlocations



You have a global ecommerce application that stores data in an Azure Cosmos DB Core (SQL) API account. The account is con gured for multi- region writes.
You need to create a stored procedure for a custom con ict resolution policy for a new container. In the event of a con ict caused by a deletion, the deletion must always take priority.
Which parameter should you check in the stored procedure function?

  1. isTombstone
  2. con ictingItems
  3. existingItem
  4. incomingItem

Answer(s): A

Explanation:

isTombstone: Boolean indicating if the incomingItem is con icting with a previously deleted item. When true, existingItem is also null.
Incorrect:
con ictingItems: Array of the committed version of all items in the container that are con icting with incomingItem on ID or any other unique index properties. existingItem: The currently committed item. This value is non-null in an update and null for an insert or deletes. incomingItem:
The item being inserted or updated in the commit that is generating the con icts. Is null for delete operations.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/sql/how-to-manage-con icts



You have an Azure Cosmos DB Core (SQL) API account named account1 that supports an application named App1. App1 uses the consistent pre x consistency level.
You con gure account1 to use a dedicated gateway and integrated cache.
You need to ensure that App1 can use the integrated cache.
Which two actions should you perform for App1? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

  1. Change the consistency level of requests to session.
  2. Change the account endpoint to http://account1.documents.azure.com.
  3. Change the account endpoint to http://account1.sqlx.cosmos.azure.com.
  4. Change the connection mode to direct.
  5. Change the consistency level of requests to strong.

Answer(s): A,C

Explanation:

C: Modify your application's connection string to use the new dedicated gateway endpoint.
All dedicated gateway connection strings follow the same pattern. Remove documents.azure.com from your original connection string and replace it with sqlx.cosmos.azure.com. A dedicated gateway will always have the same connection string, even if you remove and reprovision it.
A: You must adjust the request consistency to session or eventual. If not, the request will always bypass the integrated cache.


Reference:

https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-con gure-integrated-cache Topic 2



Viewing page 8 of 20
Viewing questions 36 - 40 out of 296 questions


Post your Comments and Discuss Microsoft DP-420 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!