NO.148 You need to implement the bindings for the CheckUserContent function.
How should you complete the code segment? To answer, select the appropriate options in the answer area.
注意:各選択肢の正誤は1点満点とする。
説明
Box 1: [BlobTrigger(..)]
Box 2: [Blob(..)]
Azure Blob storage output binding for Azure Functions. The output binding allows you to modify and delete blob storage data in an Azure Function.
The attribute’s constructor takes the path to the blob and a FileAccess parameter indicating read or write, as shown in the following example:
[FunctionName(“ResizeImage”)]
public static void Run(
[BlobTrigger(“sample-images/{name}”)] Stream image,
[Blob(“sample-images-md/{name}”, FileAccess.Write)] Stream imageSmall)
{
}
Scenario: You must create an Azure Function named CheckUserContent to perform the content checks.
The company’s data science group built ContentAnalysisService which accepts user generated content as a string and returns a probable value for inappropriate content. Any values over a specific threshold must be reviewed by an employee of Contoso, Ltd.
参考までに:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob-output
Topic 1, Contoso, Ltd
ケーススタディ
これはケーススタディです。ケーススタディは個別に時間を計ることはありません。各ケースを完了するために、好きなだけ試験時間を使うことができます。ただし、本試験ではケーススタディやセクションが追加される場合があります。与えられた時間内に、本試験で出題されるすべての問題を解き終えることができるよう、時間を管理してください。
ケーススタディに含まれる質問に答えるには、ケーススタディに記載されている情報を参照する必要があります。ケーススタディーには、ケーススタディーで説明されているシナリオに関する詳細情報を提供する展示物やその他の資料が含まれている場合があります。各問題は、このケーススタディの他の問題とは独立しています。
このケーススタディの最後には、復習画面が表示されます。この画面で解答を見直し、次のセクションに進む前に変更を加えることができます。新しいセクションを開始した後、このセクションに戻ることはできません。
ケーススタディを始めるにあたって
To display the first question in this case study, click the button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. When you are ready to answer a question, click the Background Overview You are a developer for Contoso, Ltd. The company has a social networking website that is developed as a Single Page Application (SPA). The main web application for the social networking website loads user uploaded content from blob storage.
You are developing a solution to monitor uploaded data for inappropriate content. The following process occurs when users upload content by using the SPA:
* Messages are sent to ContentUploadService.
* Content is processed by ContentAnalysisService.
* After processing is complete, the content is posted to the social network or a rejection message is posted in its place.
The ContentAnalysisService is deployed with Azure Container Instances from a private Azure Container Registry named contosoimages.
The solution will use eight CPU cores.
Azure Active Directory
Contoso, Ltd. uses Azure Active Directory (Azure AD) for both internal and guest accounts.
必要条件
ContentAnalysisService
The company’s data science group built ContentAnalysisService which accepts user generated content as a string and returns a probable value for inappropriate content. Any values over a specific threshold must be reviewed by an employee of Contoso, Ltd.
You must create an Azure Function named CheckUserContent to perform the content checks.
Costs
You must minimize costs for all Azure services.
Manual review
To review content, the user must authenticate to the website portion of the ContentAnalysisService using their Azure AD credentials. The website is built using React and all pages and API endpoints require authentication.
In order to review content a user must be part of a ContentReviewer role. All completed reviews must include the reviewer’s email address for auditing purposes.
High availability
All services must run in multiple regions. The failure of any service in a region must not impact overall application availability.
モニタリング
An alert must be raised if the ContentUploadService uses more than 80 percent of available CPU cores.
セキュリティ
You have the following security requirements:
* Any web service accessible over the Internet must be protected from cross site scripting attacks.
* All websites and services must use SSL from a valid root certificate authority.
* Azure Storage access keys must only be stored in memory and must be available only to the service.
* All Internal services must only be accessible from internal Virtual Networks (VNets).
* All parts of the system must support inbound and outbound traffic restrictions.
* All service calls must be authenticated by using Azure AD.
User agreements
When a user submits content, they must agree to a user agreement. The agreement allows employees of Contoso, Ltd. to review content, store cookies on user devices, and track user’s IP addresses.
Information regarding agreements is used by multiple divisions within Contoso, Ltd.
User responses must not be lost and must be available to all parties regardless of individual service uptime.
The volume of agreements is expected to be in the millions per hour.
Validation testing
When a new version of the ContentAnalysisService is available the previous seven days of content must be processed with the new version to verify that the new version does not significantly deviate from the old version.
課題
Users of the ContentUploadService report that they occasionally see HTTP 502 responses on specific pages.
Code
ContentUploadService