Skip to main content

🧠 Azure API Management service in a capacity-based tier has no active APIs - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

Generated at: 2026-09-22T15:06:28.816580441Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒goneβœ”οΈ 99βœ”οΈ isDisappeared(CA10Z1__disappearanceTime__c)βœ”οΈ null
🟒missing-provisioning-stateβœ”οΈ 199βœ”οΈ extract('CA10Z1__provisioningState__c').isEmpty()βœ”οΈ null
🟒updatingβœ”οΈ 299βœ”οΈ extract('CA10Z1__provisioningState__c') != 'Succeeded'βœ”οΈ null
🟒missing-skuβœ”οΈ 399βœ”οΈ extract('CA10Z1__skuName__c').isEmpty()βœ”οΈ null
🟒consumptionβœ”οΈ 499βœ”οΈ extract('CA10Z1__skuName__c') == 'Consumption'βœ”οΈ null
🟒missing-created-atβœ”οΈ 599βœ”οΈ extract('CA10Z1__createdAtUtc__c').isEmpty()βœ”οΈ null
🟒age-boundaryβœ”οΈ 699βœ”οΈ extract('CA10Z1__createdAtUtc__c').withinLastDays(30)βœ”οΈ null
🟒emptyβœ”οΈ 799βœ”οΈ CA10Z1__Azure_API_Management_APIs__r.hasNo(COMPLIANT)βœ”οΈ null
🟒only-disappeared-apiβœ”οΈ 799βœ”οΈ CA10Z1__Azure_API_Management_APIs__r.hasNo(COMPLIANT)βœ”οΈ null
🟒active-apiβœ”οΈ 800βœ”οΈ otherwiseβœ”οΈ null

Generation Bundle​

FileMD5
Open/ce/ca/azure/api-management/no-active-apis/policy.yamlF761C7BDB922D2714D3B629CA940D936
Open/ce/ca/azure/api-management/no-active-apis/prod.logic.yamlD330ADFC70E92DE353DA8C70D4415FE3
Open/ce/ca/azure/api-management/no-active-apis/test-data.json1AA3D36758EB9D6BA37E1E378867D2C2
Open/types/CA10Z1__CaAzureApiManagementService__c/object.extracts.yamlB952BD8DD43509E9EEA57E650ACDA9AD

Available Commands​

repo-manager policies generate FULL /ce/ca/azure/api-management/no-active-apis/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/api-management/no-active-apis/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/api-management/no-active-apis/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/api-management/no-active-apis/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/api-management/no-active-apis/prod.logic.yaml

Content​

Open File

---
inputType: "CA10Z1__CaAzureApiManagementService__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10Z1__CaAzureApiManagementService__c/object.extracts.yaml"
conditions:
- status: "UNDETERMINED"
currentStateMessage: "Provisioning state is unavailable."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10Z1__provisioningState__c"
- status: "INAPPLICABLE"
currentStateMessage: "The API Management service is not successfully provisioned."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__provisioningState__c"
right:
TEXT: "Succeeded"
- status: "UNDETERMINED"
currentStateMessage: "SKU is unavailable."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10Z1__skuName__c"
- status: "INAPPLICABLE"
currentStateMessage: "The API Management service uses the Consumption tier."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__skuName__c"
right:
TEXT: "Consumption"
- status: "UNDETERMINED"
currentStateMessage: "Creation time is unavailable."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10Z1__createdAtUtc__c"
- status: "INAPPLICABLE"
currentStateMessage: "The API Management service is within its first 30 days."
check:
IS_WITHIN_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10Z1__createdAtUtc__c"
- status: "INCOMPLIANT"
currentStateMessage: "The non-Consumption API Management service has no active APIs."
remediationMessage: "Verify the API inventory in Azure, then remove the service if it is unused."
check:
RELATED_LIST_HAS_NO:
status: "COMPLIANT"
relationshipName: "CA10Z1__Azure_API_Management_APIs__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The non-Consumption API Management service has at least one active API."
relatedLists:
- relationshipName: "CA10Z1__Azure_API_Management_APIs__r"
conditions: []
otherwise:
status: "COMPLIANT"
currentStateMessage: "This API record is active in Cloudaware CMDB."