arcus-azure/arcus.scripting

Add extra validation when creating a new Azure API Management context

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
In the Azure API Management-specific scripts, we mostly create a new context with the APIM details without any validation. This can cause runtime failures afterwards in the following lines.

Describe the solution you'd like
Add an additional line of validation to verify if the provided APIM details point towards a valid/existing instance.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Mentioned in #206

We'll need some other remote call to verify the resource group and service name separately, because the context returned from New-AzApiManagementContext doesn't contain any validation. Only a data object: PsApiManagementContext.