Hiii Iam trying to create a backend resource in A...
# getting-started
w
Hiii Iam trying to create a backend resource in Azure APIM. But getting an error. var backend = new Pulumi.AzureNative.ApiManagement.Backend("autobackend", new Pulumi.AzureNative.ApiManagement.BackendArgs { BackendId = "autobackend", ResourceGroupName = resourceGroup.Name, ServiceName = stackName+projectname, Url = "http://app-sea.azurewebsites.net/api", ResourceId = funcapp.Id, Protocol = "https", Tls = new Pulumi.AzureNative.ApiManagement.Inputs.BackendTlsPropertiesArgs { ValidateCertificateChain = true, ValidateCertificateName = true, }, }); Any idea what iam missing ? Error : Status=400 Code="ValidationError" Message="One or more fields contain incorrect values:" Details=[{"code":"ValidationError","message":"Value should represent absolute http URL","target":"resourceId"}]
w
I’m not familiar with that resource, but it appears to be complaining about the
Url
property and the error status 400 indicates it is an error being reported by Azure. I see that the
Url
property is set to
http://….
instead of
https://…
(i.e. not using HTTPS).
w
i tried with http as well still the same error.
w
So to clarify:
Url=
is set to
<https://app-sea.azuerwebsites.net/api>
w
URL is the Function / App service end point that iam giving. I believe thats correct.
Hi All Thanks for your help. I Am able to create the backend now. ResourceID is the Resource ID of the Function/WebAPp But Resource ID starts with the subscription/..... It should be prefixed with https://management.azure.com/ After which it started working and the backend is created.