ExamQuestions.com

Register
Login
Microsoft Azure Exam Certification (AI-102) Exam Questions

Microsoft

Microsoft Azure Exam Certification (AI-102)

17 / 166

Question 17:

To secure your Cognitive Services resource, you configured a rule to deny access to the traffic from all networks by default. In order to allow specific IP ranges from the Azure network or from your on-premises location, you intend to configure rules that grant access to traffic from specific virtual networks. 
<pre>?Code snippet to deny network access by default:
$parameters = @{
-ResourceGroupName "&lt;resource group name&gt;"
-Name "&lt;account name&gt;"
-DefaultAction Deny
}
……………………………………………….. @parameters
 
?Code snippet to add a network rule for a virtual network and subnet:
$subParameters = @{
-ResourceGroupName "&lt;resource group name&gt;"
-Name "&lt;virtual network&gt;"
}
$subnet = Get-AzVirtualNetwork @subParameters | Get-AzVirtualNetworkSubnetConfig -Name "&lt;subnet&gt;"
$parameters = @{
-ResourceGroupName "&lt;resource group name&gt;"
-Name "&lt;account name&gt;"
-VirtualNetworkResourceId $subnet.Id
}
……………………………………………….. @parameters
</pre>
Review the snippets given above and select the answer choices to complete the code: (select two answer choices)

Answer options:

A.Get-AzCognitiveServicesAccountNetworkRuleSet
B.Add-AzCognitiveServicesAccountNetworkRule
C.Get-AzVirtualNetworkSubnetConfig
D.Update-AzCognitiveServicesAccountNetworkRuleSet