(AZ-204 topic) Develop for Azure Storage Flashcards
Test takers should have familiarity with deploying Storage Accounts and developing solutions with Blob Containers. Additionally, they’ll be expected to know how to create, configure, & develop with Azure CosmosDB. Questions for this domain comprise 15% of the total questions for this exam.
What is the best way to optimize costs for your blob storage?
- Use the lifecycle management policy in your blob storage.
- Delete blobs, blob versions, and blob snapshots when no longer needed.
- Transition storage to the cold tier when not needed.
- Create rules to clean up unused blobs.
-Use the lifecycle management policy in your blob storage.
Azure Blob Storage lifecycle management offers a rich, rule-based policy to keep your account as lean and efficient as possible.
In .NET how would you retrieve blob metadata asynchronously with C#. Fill in the blank. “blob” is of type BlobClient. ```
BlobProperties properties = await blob.__________;
foreach (var metadataItem in properties.Metadata) { Console.WriteLine($”\tKey: {metadataItem.Key}”); Console.WriteLine($”\tValue: {metadataItem.Value}”); } ```
- GetBlobMetadataAsync()
- GetPropertiesAsync()
- GetMetadataAsync()
- LoadPropertiesAsync()
-GetPropertiesAsync()
Bingo! This operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.
Magic Corporation wants a new Storage Account that leverages blob storage. The primary use of this account will be to store data that needs to be kept around and accessed for legal and compliance purposes and not much else. Magic Corporation does quarterly compliance audits and last needed data from this data pool roughly a year ago. The company is of course cost-conscious, but the data needs to be available within three days of requesting it. What data tier should be configured to meet these needs?
- Hot
- Archive
- Cool
- Secure
-Cool
While the company will be using this Storage Account to store data for long-term retention, it still will be performing quarterly compliance audits that will require the data to be accessed in a semi-regular way. The Cool tier creates cost-optimization for long-term storage, but with the ability to access the data ad hoc if necessary and without re-hydrating.
The archive tier is meant for situations where the data will only need to be accessed once every 6 months or more. Data stored here is stored at the most efficient rates, but needs to be re-hydrated before it can be accessed and transmission rates are very expensive after re-hydration.
Which consistency model should you use in Cosmos DB if latency has to be minimized as a priority?
- Eventual
- Bounded Staleness
- Strong
- Session
-Eventual
This model offers high availability and low latency along with the highest throughput of all.
You need to update your company’s Blob Inventory Policy. which of the following Azure CLI commands will accomplish this?
- az storage account blob-policy set -g azuredale –account-name azuredalestorage –update “policy.rules[0].name=newname”
- az storage account blob-inventory-policy set -g azuredale –account-name azuredalestorage –update “policy.rules[0].name=newname”
- az storage account blob-inventory-policy update -g azuredale –account-name azuredalestorage –set “policy.rules[0].name=newname”
- az storage account blob-policy update -g azuredale –account-name azuredalestorage –set “policy.rules[0].name=newname”
-az storage account blob-inventory-policy update -g azuredale –account-name azuredalestorage –set “policy.rules[0].name=newname”
Using the update command, you can change parameters in your policy quickly and easily.
You’ve been recently tasked with building a basic company website that will host information about the company such as its history, contact information, agent information, and social media links. It needs to be secured both internally and externally, inexpensive, and easily modified if updates need to be applied. Additionally, the website is expected to remain operational with at least 3 9’s (99.9%) availability. What solution would be the best solution for this scenario?
- Create an Azure Container Instance running a containerized web server.
- Build a Static Web Site using Azure Blob Storage.
- Create an Azure Web App Service instance using the S1 SKU.
- Create an Azure Virtual Machine to host your website.
-Build a Static Web Site using Azure Blob Storage.
Creating a Static Web Page in your Storage Account will create a blob container that you can control access to, configure a custom domain, SSL, and allow you to create static pages that are only billed based on your storage type, the number of reads against the site, and how much storage you consume. Your storage can be regularly backed up and has guaranteed SLAs without the need to select a higher-cost service plan.
In which situation would you use a Shared Access Signature (SAS) token for your blob storage?
- To grant access to a storage container for short periods of time
- To grant limited access to storage resources to a third party
- When a third party user needs admin rights to the storage account
- When a third party needs long term access to a specific blob
-To grant limited access to storage resources to a third party
A SAS provides secure delegated access to resources in the storage account, and you get granular control over how a client can access the data in the account.
You are creating an application that uses Cosmos DB for writing customer transactions. While the application isn’t dependent on real-time updates, it is critical the transactions arrive in the right order and stay consistent for all sessions. Which consistency model should you use for Cosmos DB?
- Strong
- Consistent Prefix
- Session
- Eventual
-Consistent Prefix
Data is updated in the correct order, but there is no guarantee of when that might be.
You have been tasked with creating some new features for an existing product. The choice has been made to use Cosmos DB for its global scalability and low read/write latency. The database schema for the product resembles a traditional relational database, but needs to remain flexible as the product use grows. Which is the most appropriate API to choose for using Cosmos DB?
- Cassandra
- Core (SQL)
- MongoDB
- Gremlin
-Core (SQL)
The existing product uses a traditional relational database, which makes Core (SQL) the best choice.
Which type of Storage Blob is best for Random Access files?
- Append
- Page
- Block
- Table
-Page
Page blobs are best for when data is being constantly updated like in the case of VHD files which are constantly and randomly being accessed.
What can you do to automatically transition your blobs between storage tiers based on factors like last modified date?
- Use Lifecycle Management.
- Use a Blob Trigger to initiate a tier swap
- Use Azure Automation.
- Create an Azure Function to transition the blobs.
-Use Lifecycle Management.
Azure lifecycle management can move blobs between tiers based on rules you set in the lifecycle management console.
Which storage tier is best for storing reports that are updated once per quarter but are frequently accessed by your leadership staff?
- Hot
- Warm
- Cool
- Archive
-Hot
While updates are infrequent, the report is still referenced frequently and should be readily available when needed. This makes the Hot tier the best option because of the frequent access.
Which of the following is NOT a supported API in Cosmos DB?
- Cassandra
- MongoDB
- PostGres
- SQL
-PostGres
Cosmos does not support PostGres as an API. The SQL API would be the closest API to this.
Logical Partitions in CosmosDB are decided by what?
- The Partition Mode
- The Partition Group
- The Partition Index
- The Partition Key
-The Partition Key
The Partition Key tells Cosmos how to organize you data and will also impact the physical partitions it creates as well.
Which CosmosDB consistency model offers the least amount of data consistency when there are updates to be made?
- Session
- Eventual Consistency
- Boundless Staleness
- Consistent Prefix
-Eventual Consistency
Data is updated out of order, eventually creating a state of consistency. This is only useful when you data doesn’t necessarily need immediate or consistent updates in your other nodes and regions.