An Azure service that provides a hybrid, multi-cloud management platform for APIs.
Hello Siegfried,
Thank you for your question and for reaching out with your question today.
I understand that you are encountering a few issues when using PowerShell to create the Azure API Management backend and API. Let's address each problem individually:
- Missing information in the backend properties: The missing information in the backend properties might be related to how you are defining the backend in your PowerShell script. To ensure that the required information is populated correctly, you can modify your script as follows:
$backend = New-AzApiManagementBackend -Context $ApiMgmtContext -BackendId $backEndName -Url $backEndRunTimeURL -Protocol http -Credential $credential -Title "myazurefunc" -Description $backEndName -Properties @{"resourceId"="https://myazurefunc.azurewebsites.net"; "runtimeUrl"=$backEndRunTimeURL}
By using the -Properties parameter, you can provide additional properties, including the "resourceId" and "runtimeUrl", to the backend.
- Unchecking the subscription requirement for the API: To remove the subscription requirement for your API, you can use the following PowerShell command:
Set-AzApiManagementApi -Context $ApiMgmtContext -ApiId "your-api-id" -SubscriptionRequired $false
Replace "your-api-id" with the ID or name of your API.
- Adding the API to a product: To add the API to your product called "Unlimited", you can use the following PowerShell command:
Add-AzApiManagementProductApi -Context $ApiMgmtContext -ProductId "your-product-id" -ApiId "your-api-id"
Replace "your-product-id" with the ID or name of your product, and "your-api-id" with the ID or name of your API.
Regarding the safety of publishing your Azure function name, it's generally recommended to avoid sharing sensitive information, such as specific resource names, in public forums. If Microsoft employees need to access your Azure resources, they would typically request that information privately for security reasons.
Make sure to replace "your-api-id" and "your-product-id" with the actual IDs or names of your API and product in the provided PowerShell commands.
I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.
If the reply was helpful, please don’t forget to upvote or accept as answer.
Best regards.