Exam-Answer

Home / Microsoft / AZ-300 / Question 61

Prev Question
Next Question

Question 61

You create an Azure Application Gateway that represents the front-end for a pool of two Azure backend virtual machines (VMs). One VM hosts images for a web application, while the other VM hosts videos. You create a path map and a backend listener.

You need to associate the path map with the backend listener.

How should you create the PowerShell cmdlet? Select correct placeholder values.

$gateway = Get-AzureRmApplicationGateway

-ResourceGroupName myResourceGroupAG

-Name myAppGateway

$backendlistener = Get-AzureRmApplicationGatewayHttplistener

-ApplicationGateway $gateway

-Name backenclastener

$config = Get-AzureRmApplicationGatewayUrlPathMapConfig

-PLACEHOLDER 1

-Name urlpathmap

PLACEHOLDER 2

-ApplicationGateway $gateway

-Name rule2

-RuleType PathBasedRouting

PLACEHOLDER 3

-UrlPathMap $config

Answers


Advertisement

Explanation

You should use the following cmdlet to get a reference to the path map:

$config = Get-AzureRmApplicationGatewayUrlPathMapConfig

-ApplicationGateway $gateway

-Name urlpathmap

This cmdlet stores the path map into a variable named $config.

You should use the following cmdlet to associate the path map with the backend listener of the application gateway:

Add-AzureRmApplicationGatewayRequestRoutingRule

-ApplicationGateway $gateway

-Name rule2

-RuleType PathBasedRouting

-HttpListener $backendlistener

-UrlPathMap $config

The RuleType parameter specifies that the rule should use path-based routing. The HttpListener parameter specifies a reference to the backend HTTP listener. The UrlPathMap parameter specifies a reference to the path map that you stored in the $config variable.

You should use Set-AzureRmApplicationGateway to update the Application Gateway with the changes.

You should not use the following cmdlet to get a reference to the path map:

$config = Get-AzureRmApplicationGatewayUrlPathMapConfig

-HttpListener $backendListener

-Name urlpathmap

You must specify a reference to the Application Gateway, not a reference to the backend listener.

You should not use New-AzureRmApplicationGateway. This cmdlet creates a new Application Gateway. In this scenario, the Application Gateway already exists.

References

Comments

Load more
Prev Question
Next Question