You develop a gateway solution for a public facing news API.
The news API back end is implemented as a RESTful service and uses an OpenAPI specification.
You need to ensure that you can access the news API by using an Azure API Management service instance.
Which Azure PowerShell command should you run?
Click on the arrows to vote for the correct answer
A. B. C. D.D.
New-AzureRmApiManagementBackendProxy creates a new Backend Proxy Object which can be piped when creating a new Backend entity.
Example: Create a Backend Proxy In-Memory Object PS C:\>$secpassword = ConvertTo-SecureString "PlainTextPassword" -AsPlainText -Force PS C:\>$proxyCreds = New-Object System.Management.Automation.PSCredential ("foo", $secpassword) PS C:\>$credential = New-AzureRmApiManagementBackendProxy -Url "http://12.168.1.1:8080" -ProxyCredential $proxyCreds PS C:\>$apimContext = New-AzureRmApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso" PS C:\>$backend = New-AzureRmApiManagementBackend -Context$apimContext -BackendId 123 -Url 'https://contoso.com/awesomeapi' -Protocol http -Title "first backend" -SkipCertificateChainValidation $true -Proxy $credential -Description "backend with proxy server" Creates a Backend Proxy Object and sets up Backend Incorrect Answers: A: The Import-AzureRmApiManagementApi cmdlet imports an Azure API Management API from a file or a URL in Web Application Description Language (WADL), Web Services Description Language (WSDL), or Swagger format.
B: New-AzureRmApiManagementBackend creates a new backend entity in Api Management.
C: The New-AzureRmApiManagement cmdlet creates an API Management deployment in Azure API Management.
https://docs.microsoft.com/en-us/powershell/module/azurerm.apimanagement/new-azurermapimanagementbackendproxy?view=azurermps-6.13.0To ensure that you can access the news API by using an Azure API Management service instance, you need to import the OpenAPI specification into the API Management service instance.
Option A: Import-AzureRmApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath $SwaggerPath -Path $Path This PowerShell command imports an API into an existing Azure API Management instance. It requires the following parameters:
This command can be used to import an OpenAPI specification file in Swagger format.
Option B: New-AzureRmApiManagementBackend -Context $ApiMgmtContext-Url $Url -Protocol http This PowerShell command creates a new backend for an existing API Management instance. It requires the following parameters:
This command can be used to create a backend for the news API, but it does not import the OpenAPI specification.
Option C: New-AzureRmApiManagement -ResourceGroupName $ResourceGroup -Name $Name "Location $Location -Organization $Org -AdminEmail $AdminEmail This PowerShell command creates a new Azure API Management instance. It requires the following parameters:
This command can be used to create a new API Management instance, but it does not import the OpenAPI specification.
Option D: New-AzureRmApiManagementBackendProxy -Url $ApiUrl. This PowerShell command creates a new backend proxy for an existing API Management instance. It requires the following parameter:
This command can be used to create a backend proxy for the news API, but it does not import the OpenAPI specification.
Therefore, the correct answer is option A: Import-AzureRmApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath $SwaggerPath -Path $Path. This command imports the OpenAPI specification into the API Management instance, allowing you to access the news API.