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?
Answer(s): C
Example:// Create a new instance of the Cosmos Clientthis.cosmosClient = new CosmosClient(EndpointUri, PrimaryKey)//ADD THIS PART TO YOUR CODEawait this.CreateDatabaseAsync();
https://docs.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started
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?
Answer(s): A
You can copy blobs, directories, and containers between storage accounts by using the AzCopy v10 command-line utility.The copy operation is synchronous so when the command returns, that indicates that all files have been copied.
https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-blobs-copy
DRAG DROP (Drag and Drop is not supported) You are developing a web service that will run on Azure virtual machines that use Azure Storage. You configure all virtual machines to use managed identities.You have the following requirements:-Secret-based authentication mechanisms are not permitted for accessing an Azure Storage account.-Must use only Azure Instance Metadata Service endpoints.You need to write code to retrieve an access token to access Azure Storage. To answer, drag the appropriate code segments to the correct locations. Each code segment may be used once or not at all. You may need to drag the split bar between panes or scroll to view content.NOTE: Each correct selection is worth one point.Select and Place:
Azure Instance Metadata Service endpoints "/oauth2/token"Box 1: http://169.254.169.254/metadata/identity/oauth2/tokenSample request using the Azure Instance Metadata Service (IMDS) endpoint (recommended):GET 'http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://management.azure.com/' HTTP/1.1 Metadata: trueBox 2: JsonConvert.DeserializeObject<Dictionary<string,string>>(payload);Deserialized token response; returning access code.
https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/how-to-use-vm-token https://docs.microsoft.com/en-us/azure/service-fabric/how-to-managed-identity-service-fabric-app-code
DRAG DROP (Drag and Drop is not supported) You are developing a new page for a website that uses Azure Cosmos DB for data storage. The feature uses documents that have the following format:You must display data for the new page in a specific order. You create the following query for the page:You need to configure a Cosmos DB policy to support the query.How should you configure the policy? To answer, drag the appropriate JSON segments to the correct locations. Each JSON segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.NOTE: Each correct selection is worth one point.Select and Place:
Box 1: compositeIndexes You can order by multiple properties. A query that orders by multiple properties requires a composite index.Box 2: descending Example: Composite index defined for (name ASC, age ASC):It is optional to specify the order. If not specified, the order is ascending.{"automatic":true,"indexingMode":"Consistent","includedPaths":[{"path":"/*"}],"excludedPaths":[],"compositeIndexes":[[{"path":"/name",},{"path":"/age",}]]}
HOTSPOT (Drag and Drop is not supported) You are building a traffic monitoring system that monitors traffic along six highways. The system produces time series analysis-based reports for each highway.Data from traffic sensors are stored in Azure Event Hub.Traffic data is consumed by four departments. Each department has an Azure Web App that displays the time series-based reports and contains a WebJob that processes the incoming data from Event Hub. All Web Apps run on App Service Plans with three instances.Data throughput must be maximized. Latency must be minimized.You need to implement the Azure Event Hub.Which settings should you use? To answer, select the appropriate options in the answer area.NOTE: Each correct selection is worth one point.Hot Area:
Box 1: 6 The number of partitions is specified at creation and must be between 2 and 32.There are 6 highways.Box 2: Highway
https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-features
Post your Comments and Discuss Microsoft AZ-204 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-204 content, but please register or login to continue.