π§ AWS API Gateway REST API Detailed CloudWatch Metrics are not enabled - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
Test Results π’β
Generated at: 2025-12-27T12:01:39.223166372Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | 001 | βοΈ 199 | βοΈ not(setOfText(['restApi']).contains(RecordType.DeveloperName)) | βοΈ null |
| π’ | 002 | βοΈ 299 | βοΈ CA10__AWS_API_Gateway_Stages__r.count(COMPLIANT) == number(0.0) | βοΈ null |
| π’ | 003 | βοΈ 399 | βοΈ CA10__AWS_API_Gateway_Stages__r.has(INCOMPLIANT) | βοΈ null |
| π’ | 004 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/policy.yaml | 91CD4D218AA2945DC5AA2903AEA04011 |
| Open | /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml | C476CB03687A24E3103189940593FAC8 |
| Open | /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/test-data.json | FC9F638A748647E918277495758C2A22 |
| Open | /types/CA10__CaAwsApiGatewayStage__c/object.extracts.yaml | 4C63240D980BDDAFE321E6FFAC8F9034 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/apigateway/rest-api-detailed-cloudwatch-metrics/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsApiGatewayRestApi__c"
testData:
- file: test-data.json
recordTypes:
- restApi
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "There is no related API Stage where CloudWatch Metrics are enabled."
remediationMessage: "Consider enabling CloudWatch Metrics for the API Stage."
check:
IS_EQUAL:
left:
RELATED_LIST_COUNT:
status: "COMPLIANT"
relationshipName: "CA10__AWS_API_Gateway_Stages__r"
right:
NUMBER: 0.0
- status: "INCOMPLIANT"
currentStateMessage: "There is at least one related API Stage where CloudWatch Metrics are not enabled."
remediationMessage: "Consider enabling CloudWatch Metrics for the API Stage."
check:
RELATED_LIST_HAS:
relationshipName: "CA10__AWS_API_Gateway_Stages__r"
status: "INCOMPLIANT"
otherwise:
status: "COMPLIANT"
currentStateMessage: "CloudWatch Metrics for all API Stages are enabled."
relatedLists:
- relationshipName: "CA10__AWS_API_Gateway_Stages__r"
importExtracts:
- file: "/types/CA10__CaAwsApiGatewayStage__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "CloudWatch Metrics are not enabled for this API Stage."
remediationMessage: "Consider enabling CloudWatch Metrics for this API Stage."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__cloudWatchMetricsEnabled__c"
right:
BOOLEAN: false
otherwise:
status: "COMPLIANT"
currentStateMessage: "CloudWatch Metrics are enabled."