exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 5 question 7 discussion

Actual exam question from Microsoft's AZ-204
Question #: 7
Topic #: 5
[All AZ-204 Questions]

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?

  • A. Import-AzureRmApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath $SwaggerPath -Path $Path
  • B. New-AzureRmApiManagementBackend -Context $ApiMgmtContext -Url $Url -Protocol http
  • C. New-AzureRmApiManagement -ResourceGroupName $ResourceGroup -Name $Name ג€"Location $Location -Organization $Org -AdminEmail $AdminEmail
  • D. New-AzureRmApiManagementBackendProxy -Url $ApiUrl
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Vano6k
Highly Voted 4 years, 2 months ago
I think the correct answer is A because it is the one tuhat takes advantage of the swagger definition of the API?
upvoted 86 times
MiraA
3 years, 6 months ago
There is an example of importing an API from an Open Api Link using Import-AzApiManagementApi cmdlet: https://docs.microsoft.com/en-us/powershell/module/az.apimanagement/import-azapimanagementapi#example-4--import-an-api-from-a-open-api-link And as mentioned here: https://docs.microsoft.com/en-us/powershell/module/azurerm.apimanagement/import-azurermapimanagementapi the Import-AzureRmApiManagementApi cmdlet is obsoleted by Import-AzApiManagementApi cmdlet. So I would select answer A.
upvoted 8 times
...
pac1311
4 years, 2 months ago
Think so too, the accepted answer has to be wrong.
upvoted 1 times
...
Eduarv2015
4 years, 2 months ago
It does not says that the API has swagger, D is correct.
upvoted 3 times
fadikh
4 years, 1 month ago
Swagger and OpenAPI specs are the same
upvoted 14 times
trance13
4 years ago
They are not the same.
upvoted 2 times
dhishkiyaau
3 years, 7 months ago
OpenAPI = The specification itself, formerly known as Swagger specification. Swagger = Tools used in the implementation of OpenAPI.
upvoted 14 times
...
...
...
...
zero0
3 years, 10 months ago
Totally agree. find the 2 line code here. https://docs.microsoft.com/en-us/powershell/module/azurerm.apimanagement/import-azurermapimanagementapi?view=azurermps-6.13.0
upvoted 4 times
...
...
10x
Highly Voted 4 years, 2 months ago
D should be the answer - it is about accessing API - not creating it (eg based on swagger)
upvoted 15 times
XYZ2
4 years ago
but you should have one first, that's why you need to create it before able to use
upvoted 1 times
borfavor
3 years, 12 months ago
"The news API back end is implemented as a RESTful service and uses an OpenAPI specification." This clearly tells us the API already exists
upvoted 4 times
asdasdasg2
3 years, 3 months ago
It exists in reality, but not on API management. API management API != backend API
upvoted 6 times
...
...
...
...
Vichu_1607
Most Recent 5 months, 1 week ago
Selected Answer: A
Import-AzureRmApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath $SwaggerPath -Path $Path
upvoted 1 times
...
katrang
1 year, 7 months ago
A When importing certain APIs, API Management configures the API backend automatically. For example, API Management configures the backend web service when importing: An OpenAPI specification. A SOAP API. Azure resources, such as an HTTP-triggered Azure Function App or Logic App.
upvoted 1 times
...
uffuchsi
2 years, 2 months ago
Selected Answer: A
Since we already have an API back end, we need to import to Azure API Management. https://docs.microsoft.com/en-us/azure/api-management/scripts/powershell-import-api-and-add-to-product?toc=/powershell/module/toc.json
upvoted 2 times
...
Sriniv
2 years, 2 months ago
Answer is B reason To configure an Azure API Management instance for a RESTful service that uses an OpenAPI specification, you can use the New-AzApiManagementBackend cmdlet to define the backend service and the Set-AzApiManagementApi cmdlet to add an API to the API Management instance. Here's an example Azure PowerShell command: New-AzApiManagementBackend -ResourceGroupName "myResourceGroup" -Name "myBackend" -Url "https://news-api.example.com" -Protocol "https" -Title "News API" Set-AzApiManagementApi -Context "myApiManagementInstance" -SpecificationFormat "OpenApi" -SpecificationUrl "https://news-api.example.com/openapi.json" -Path "/news" -DisplayName "News API" -BackendUrl "https://news-api.example.com" -BackendProtocol "https" -BackendId "myBackend"
upvoted 1 times
...
Sriniv
2 years, 2 months ago
I think answer is b New-AzApiManagementBackend -ResourceGroupName "myResourceGroup" -Name "myBackend" -Url "https://news-api.example.com" -Protocol "https" -Title "News API" Set-AzApiManagementApi -Context "myApiManagementInstance" -SpecificationFormat "OpenApi" -SpecificationUrl "https://news-api.example.com/openapi.json" -Path "/news" -DisplayName "News API" -BackendUrl "https://news-api.example.com" -BackendProtocol "https" -BackendId "myBackend" This command creates a new backend service named "myBackend" that points to the URL of the news API, and then creates a new API in the specified Azure API Management instance that references the OpenAPI specification for the news API. The API is mapped to the "/news" path and is associated with the backend service. The BackendId parameter specifies the ID of the backend service that was created earlier.
upvoted 1 times
...
OPT_001122
2 years, 4 months ago
Selected Answer: A
A. Import-AzureRmApiManagementApi -Context $ApiMgmtContext -SpecificationFormat "Swagger" -SpecificationPath $SwaggerPath -Path $Path
upvoted 2 times
POOOJAAAAAAAAAA
2 years, 4 months ago
not sure A or C .. New-AzApiManagement -Name "myapim" -ResourceGroupName "myResourceGroup" ` -Location "West US" -Organization "Contoso" -AdminEmail "[email protected]" Reference: https://learn.microsoft.com/en-us/azure/api-management/powershell-create-service-instance
upvoted 1 times
...
...
elequiel
2 years, 5 months ago
Selected Answer: A
Letter A because you need to create using OpenAPI
upvoted 1 times
...
OPT_001122
2 years, 5 months ago
Selected Answer: A
correct answer is A
upvoted 1 times
...
coffecold
2 years, 6 months ago
*-AzureRmApiManagement* can be *-AzApiManagement in future exams AzureRM will be replaced by AZ Powershell.
upvoted 2 times
...
gmishra88
2 years, 6 months ago
Seems like Microsoft has no review mechanism. Look at how the vote is so divided. Microsoft should make this an open book exam. They can be assured people still will not get good scores. Isn't that their intention?
upvoted 2 times
macobuzi
1 year, 8 months ago
More people will have to retake the exam, more money for Microsoft!
upvoted 2 times
...
...
Satish_Babu
2 years, 8 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
HumbleYolo
2 years, 9 months ago
Selected Answer: C
whizlab has c
upvoted 5 times
...
vavra
3 years ago
Selected Answer: C
It is a creation, and docs https://docs.microsoft.com/en-us/powershell/module/azurerm.apimanagement/new-azurermapimanagement?view=azurermps-6.13.0 says there are obligatory params -ResourceGroupName <String> -Name <String> -Location <String> -Organization <String> -AdminEmail <String> It must be C.
upvoted 2 times
...
SivajiTheBoss
3 years, 1 month ago
Selected Answer: A
A seems more promising
upvoted 1 times
...
ReniRechner
3 years, 1 month ago
Selected Answer: A
A: Import also creates. Importing also creates an already configured instance (opposed to C) B: We don't need another backend, we need a frontend for an exisiting backend C: creates a new APIM, but you would still need to manually configure it. D: is meant to proxy a public API (https://petri.com/how-to-use-the-azure-api-management-to-proxy-a-public-api) => A looks most promising
upvoted 9 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago