Using Azure Services from Code and Command Line Flashcards
What would you connect to with this code:
var obj = ConnectionMultiplexer.Connect(GetConnectionString());
A Redis Database instance
What would you connect to with this code:
var obj = account.CreateCloudTableClient(new TableClientConfiguration());
Azure Table Storage from CosmosDb using Table API
https://docs.microsoft.com/en-us/azure/cosmos-db/tutorial-develop-table-dotnet
What would you connect to with this code:
var obj = new DocumentClient(GetUri(), GetAuthKey());
Azure Cosmos DB service
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.documentclient?view=azure-dotnet
True or False:
az storage blob copy will copy a blob asynchronously and allow you to restart from the point of failure if there is an error
False
az storage blob copy does run asynchronously but it does not support restart
Use the powershell AzCopy module if restarting is required
You want to quickly upload the data in a collection of small files held in a local folder to blob storage. This is a one-off request. You don’t want to overwrite blobs that have been modified in the last two days. Which tool should you use?
A: az CLI
B: AzCopy Powershell
C: .Net Storage Client Library
az copy
Use should not use .Net Client Library as it is a one off task
Use should not use AzCopy since this does not support checking the last modified time
You want to transfer a series of large files to blob storage. It may take several hours to upload each file, and you’re concerned that if a transfer fails it shouldn’t have to restart from the beginning. Which tool is the most appropriate to do this task?
A: az CLI
B: AzCopy Powershell
C: .Net Storage Client Library
AzCopy is ideal for transferring large files as it can run in the background and you can monitor the status of AzCopy jobs.
The Azure CLI doesn’t provide a way to resume a failed transfer.
You could use .Net Storage Client Library to write your own custom application for this task, but the AzCopy utility already provides the features you require
You want to move a set of blobs in Azure storage from one storage account to another. You want to organize the blobs in the destination account in different folders, according to the month in which each blob was last updated. You’ll be performing this task at regular intervals. Which tool should you use?
A: az CLI
B: AzCopy Powershell
C: .Net Storage Client Library
C: .Net Storage Client Library - As this is a repeatable task the extra effort is justified
Neither the Azure CLI nor AzCopy provide a simple way to reorganize blobs in this way
Which cloud service model would be the best match for the following situation? A SQL Server database is needed for a short-term project.
The IT department does not have available hardware that meets the performance requirements or resources to deploy it.
The project starts next week.
Once the project is over, the database is no longer needed.
A: IaaS
B: PaaS
C: SaaS
B: PaaS
Because of the immediate need and short lifetime, PaaS is the best option. For example, you could use Azure SQL Database for the solution.
IaaS is not as good of a choice because creating a virtual machine and installing SQL Server would require more time and effort than using a pre-built PaaS offering.
Which cloud service model is described in the following scenario?
You create several virtual machines in the cloud.
The VMs are networked together using a virtual network.
The VMs have access to x-ray image files in cloud storage.
One virtual machine is a web server that hosts a website exposed to the internet for customers to access their records.
There is a VPN that connects the solution to your on-premises datacenter for customer information to display with the image files.
A: IaaS
B: PaaS
C: SaaS
A: IaaS
All the resources used in this scenario can be implemented using IaaS.
Only part of the solution could be implemented using PaaS, so it would not be a good choice.
Since this is a custom solution, we can assume there isn’t a SaaS offering that delivers this functionality.
Which cloud service model would be the best match for the following situation?
You work at a start-up company with a small number of employees who need to collaborate.
They need email, calendar scheduling, and somewhere to store documents.
The team is technical but do not have the time or hardware to implement and manage a solution.
A: IaaS
B: PaaS
C: SaaS
C: SaaS solution such as Microsoft 365 would be a good solution for the collaboration requirements.
True or False:
Tags can be applied to any type of resource on Azure
False: Not all resources support tags
You will want to confirm that your resource type supports them.
https://docs.microsoft.com/en-us/learn/modules/control-and-organize-with-azure-resource-manager/3-use-tagging-to-organize-resources
True or False:
Tags applied at a resource group level are propagated to resources within the resource group.
False: Tags are not inherited.
Tags need to be applied to every supported resource that you want tagged.
https://docs.microsoft.com/en-us/learn/modules/control-and-organize-with-azure-resource-manager/3-use-tagging-to-organize-resources
Which of the following features does not apply to resource groups?
A: Resources can be in only one resource group.
B: Resources can be moved from one resource group to another resource group.
C: Resource groups can be nested.
D: Role-based access control can be applied to the resource group.
C: Resource groups cannot be nested.
A resource group is a logical container for resources deployed on Azure. These resources are anything you create in an Azure subscription like virtual machines, Application Gateways, and CosmosDB instances.
All resources must be in a resource group and a resource can only be a member of a single resource group.
Many resources can be moved between resource groups with some services having specific limitations or requirements to move.
Resource groups can’t be nested.
Before any resource can be provisioned, you need a resource group for it to be placed in.
https://docs.microsoft.com/en-us/learn/modules/control-and-organize-with-azure-resource-manager/2-principles-of-resource-groups
Which of the following approaches might be a good usage of tags?
A: Using tags to associate a cost center with resources for internal chargeback
B: Using tags in conjunction with Azure Automation to schedule maintenance windows
C: Using tags to store environment and department association
D: All of the above are good ways to use tags
D: All of the examples are good ways to use tags
https://docs.microsoft.com/en-us/learn/modules/control-and-organize-with-azure-resource-manager/3-use-tagging-to-organize-resources
Which of the following approaches would be the most efficient way to ensure a naming convention was followed across your subscription?
A: Send out an email with the details of your naming conventions and hope it is followed
B: Create a policy with your naming requirements and assign it to the scope of your subscription
C: Give all other users except for yourself read-only access to the subscription. Have all requests to create resources sent to you so you can review the names being assigned to resources, and then create them.
B: Create a policy with your naming requirements and assign it to the scope of your subscription
https://docs.microsoft.com/en-us/learn/modules/control-and-organize-with-azure-resource-manager/4-use-policies-to-enforce-standards