r3verse
r3verse

Reputation: 1080

Checking referenced resources with an Azure Policy

Lets say i have a Microsoft.ApiManagement/service/products resource named Public and i want to enforce a policy where only 2 API resources at Microsoft.ApiManagement/service/products/apis are allowed to reference the Public resource.

Is this possible? I only see examples where a single resource value is being checked, this is a problem where it's crossing resources.

I was thinking of doing the Microsoft.ApiManagement/service/products[*] iteration and then checking the api's using the allOf operator, but api's aren't a property value of Microsoft.ApiManagement/service/products, it's a separate resource.

Upvotes: 0

Views: 105

Answers (1)

Kemley
Kemley

Reputation: 204

You can try using the count feature to see how many resource reference. However, it looks like ApiManagement doesn't have any aliases so you can't use policy on it.

Upvotes: 1

Related Questions