v1 Flashcards
A service uploads files to blob storage. You need to design a system to process the files and then resave them on upload. You configure a Blob storage trigger that is triggered from Blob upload - does that meet the goal?
Yes
Send a HTTP request that specifies an image size on an existing blob.
PUT https://whatever/home/image.png?comp=metadata
x-ms-meta-imagesize : Large
Which API management access restriction policy will ensure secure support for AD authentication based on a value passed as a request query parameter?
Validate JWT
What command will generate a docker container image?
az acr build
What would give an API client a 403 Forbidden without anything changing in permissions or request? (Which Azure API Management Policy)
Set usage quota by key
Is shared data caching faster than private data caching?
No. Private is faster.
Does private data caching guarantee that all application instances see the same view of cached data?
No.
What is the command string to grant access for an application to Azure Key Vault?
Set-AzKeyVaultAccessPolicy -VaultName -ServicePrincipalName (client id from Azure) - PermissionsToSecrets get
Filesystem and blob storage are supported for both Linux and Windows apps.
False. Linux apps support only filestorage.
When using blob storage, the storage account must be in the same region as the app service.
True.
Filesystem storage is designed for short-term logging and turns itself off after 12 hours.
Yes.
What Service Bus filter should be used to filter based on a set of conditions matched against one or more properties?
CorrelationFilter
What service bus filter should be used to for conditional expressions to filter messages?
SqlFilter
What three actions should be performed to encrypt a, on premises VHD and create a virtual machine on Azure?
- Encrypt on-premises VHD using BitLocker withoiut a TPM module. Upload to Azure storage.
- Run the Set-AzVMOSDick cmdlet
- Run New-AzVM cmdlet
What is an API revision?
A revision allows you to add non-breaking changes to a web API, such as the addition of operations. Users can access the revision by using a different query string at the same endpoint.
What parameter is required by SendAsync to send events to a Service Bus queue?
new Message(Encoding.UTF8.GetBytes( string ) )
What does the command “az webapp cors add” do in an API app?
This adds a CORS rule, which allows requests to the API to run without a CORS error.
What API management policy will require OpenID Connect and prevent anonymous usage?
validate-jwt
In Docker, what three actions should be performed to publish an app container image to a Container Registry?
- Build the dockerfile with docker build
- Tag the image
- Login in the registry with az acr login and push the image to the registry
What consistency level with guarantee the highest availability and lowest latency for data reads from a SQL Cosmos db?
Eventual.
SendMessageAsync to a Service Bus requires what parameter type?
new ServiceBusMessage( string )
What is the most appropriate Cosmos DB API for an application that with gather large amounts of data and use graph database algorithms for analysis.
Gremlin! It is designed for fully-managed data-based solutions for graph data.
What 5 commands should a Dockerfile contain to build an application, then deploy the app to be accessible over port 443, then execute the .dll when the container starts?
- FROM microsoft/dotnet:2.2-aspnetcore-runtime-stretch-slim AS baseWORKDIR /appEXPOSE 4453
- FROM microsoft/dotnet:2.2-sdk-stretch AS build WORKDIR /appDir RUN dotnet build “App.csproj”
- FROM build as publish RUN dotnet publish “App.csproj”
- FROM base as final WORKDIR /app COPY –from-publish /app .
- ENTRYPOINT [“dotnet”, “App,dll”]
Can you write triggers, stored procedures, or UDFs in a CosmosDB running Table API?
No! You can only write custom code in JS using the SQL API.
Can you write stored procedures in CosmosDB using C#?
No! CosmosDB only supports procs, triggers, and UDFs in JS to be executed by the db engine.
What is the data limit for Azure Service Bus?
80GB of messages.
What is the data limit for Azure Queue storage?
500TB of messages.
What does blob leasing do?
Prevent a blob from being overwritten.
Is table aliasing required when querying Azure Cosmos DB in SQL when referencing column names?
Yes!
What is an API header version?
Header versioning allows API consumers to add an HTTP header and access new API features.
What are the fields in an NCRONTAB expression?
second minute hour day month day-of-week
When should a Confidential Client Application be used?
When the application is not interacting with users.
What is a/the benefit of the Premium plan when using Azure functions?
The premium plans provides a pre-warmed instance of the function runtime. This ensures that the runtime environment is always processing incoming messages.
What is the trigger of a Function?
Triggers are what cause a function to run. A trigger defines how a function is invoked and a function must have exactly one trigger. Triggers have associated data, which is often provided as the payload of the function.
When would you authenticate with managed identity for an API?
This is used to authenticate with a backend service using the managed identity of the API Management service. This policy uses the managed identity to obtain an access token from AD for accessing a resource. It cannot be used for user control.
What are the features of the data consistency level ‘Bounded staleness’?
- Guarantees that data writes are returned in order with no gaps
- Latency and adverse impact on data availability is minimized
- Low processing overhead
- Data is versioned
What does the command AzCopy do?
- Moves the blog to a different storage account
- Asynchronous
- If the copy fails it will be possible to restart the copy at or near the point of failure
What are user analytics used for in App Insights?
You can use user analytics to know how many people used your application and how many users visited the campaign page. Users are counted by using anonymous IDs stored in browser cookies.
How are results queries from CosmosDB formatted?
As JSON
What can be used in the FROM clause of a CosmosDB query?
Any name! Queries are executed in the container context.
How is the connection string formatted for an Event Hubs hub?
Endpoint=sb://.servicebus.windows.net/;EntityPath=
What generations of VM is Azure Disk Encryption supported for?
1 and 2
What disk image type is required for uploading a VM to Azure?
VHD
Is a fixed-size disk required for a VM to be uploaded to Azure?
Yes!
A test API request in the Dev Portal returns: 401 Access Denied due to missing subscription key. What is the fix?
- Include Ocp-Apim-Subscription-Key header in the http request
- Add the API to a product in the Azure portal
What does the caching behavior ‘override’ do?
Ignores the duration provided in the request header and uses the duration config setting.
Where do ASP.NET applications support saving session state data?
SQL Server DBs
Service Bus topic vs. Service Bus queue vs. Event Hub
A service bus topic allows multiple applications to create subscriptions for receiving messages sent by the topic. The receiving app chooses in this case how fast it will process the messages. Messages end up in the deadletter queue if something goes wrong.
A service bus queue allows only one client to retrieve a message from the queue. Once it’s retrieved, it’s removed from the queue.
An Event Hub/Grid is similar to a service bus in that events are published and consumed by subscribers, but the consumer doesn’t get to decide how fast to handle the messages.
What command reboots the nodes of a Redis cache?
Reset-AzRedisCache. Premium tier only.
Can blobs be copies from an archive?
Yes, but they will have to be rehydrated to a hot/cold tier.
What are the features of change feed in cosmos db?
- Enabled by default
- Does not capture deletes
- Does not guarantee order across partition key values
Send a Service Bus Queue message
await Client.SendAsync( new Message( Encoding.UTF8.GetBytes( string ) ) )
Azure CDN optimized for: General Media Streaming
Live/on demand video
Azure CDN optimized for: General web delivery
large, static websites
Azure CDN optimized for: Video on demand
video on demand!
Azure CDN optimized for: Dynamic site acceleration
changing data with no benefit from caching
Send Service Bus Message
SendMessageAsync( new ServiceBusMessage( string ) )
Azure Service Bus
Queueing, FIFO, duplicate detection, 80gb max
Storage Queue
no ordering, no FIFO, 500tb max
Event Hub
Queueing, no FIFO
What does Blob Leasing go?
Prevents deletion or overwriting of a blob
Configure a docker image
- Expose port
- Build app
- Publish app
- Copy
- Set entrypoint
Strong Data Consistency
No partial or uncommitted writes are returned. Highest latency, lowest availability
Bounded Staleness
reads lag behind writes. Versioned.
Session Consistency
Reads honor Consistent Prefix
Consistent Prefix
Writes returned in order, including partial writes
Eventual Consistency
No read guarantee. Lowest latency, highest availability.
Create a Service Bus
- create Resource Group
- create Namespace
- create service bus queue
Create and Deploy webapp
- Create group
- create appservice plan
- create webapp
- webapp deployment source
What is managed identity?
Secure access without passing credentials.
How do you monitor the CPU using of an AppService?
Monitor the AppService Plan. This contains the CPU usage, memory %, disk usage, and queue length stats
API Version vs. Revision
Version = header value Revision = url change
Publish an ACR instance image
acr import –name –source -t (for Target image name)
Regis SETEX
Set value AND expiration
ACI Container Groups
Hosts a set of containers on the same host machine