β Repository β π Compliance Engine β π CloudAware β π AWS β π ElastiCache β π‘οΈ Memcached Cluster is underutilizedπ’
π§ AWS ElastiCache Memcached Cluster is underutilized - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml
- Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π AWS ElastiCache Cluster
- π AWS ElastiCache Cluster - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-10-01T12:45:30.447820927Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | 001 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | 002 | βοΈ 299 | βοΈ extract('CA10__status__c') != 'available' | βοΈ null |
π’ | 003 | βοΈ 399 | βοΈ not(extract('CA10__createTime__c').beyondLastDays(30)) | βοΈ null |
π’ | 004 | βοΈ 599 | βοΈ extract('CA10__cpuUtilizationAvg30d__c') < number(40.0) | βοΈ null |
π’ | 005 | βοΈ 600 | βοΈ otherwise | βοΈ null |
π’ | 006 | βοΈ 199 | βοΈ extract('CA10__engine__c') != 'memcached' | βοΈ null |
Generation Bundleβ
File | MD5 | |
---|---|---|
Open | /ce/ca/aws/elasticache/memcached-cluster-underutilized/policy.yaml | 66FFF035EF03ED16F13B8B29EAD532CB |
Open | /ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml | 14DEFFCFE212B311EDD99ADFC9669D3B |
Open | /ce/ca/aws/elasticache/memcached-cluster-underutilized/test-data.json | 53609EFDECD2913716020AC396501827 |
Open | /types/CA10__CaAwsCacheCluster__c/object.extracts.yaml | 497EA9504E635EE5C4F6712F3EEE2A96 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/elasticache/memcached-cluster-underutilized/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsCacheCluster__c"
importExtracts:
- file: "/types/CA10__CaAwsCacheCluster__c/object.extracts.yaml"
testData:
- file: 'test-data.json'
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The policy only applicable to Memcached Clusters."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__engine__c"
right:
TEXT: "memcached"
- status: "INAPPLICABLE"
currentStateMessage: "The cluster is not available."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__status__c"
right:
TEXT: "available"
- status: "INAPPLICABLE"
currentStateMessage: "The cluster has been created for less than 30 days."
check:
NOT:
arg:
IS_BEYOND_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10__createTime__c"
- status: UNDETERMINED
currentStateMessage: "There is not enough data in the CMDB to identify if the cluster is underutilized."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__cpuUtilizationAvg30d__c"
- status: "INCOMPLIANT"
currentStateMessage: "The cluster is underutilized with Average CPU Utilization < 40%"
remediationMessage: "Consider rightsizing, consolidating or terminating the instance."
check:
LESS_THAN:
left:
EXTRACT: CA10__cpuUtilizationAvg30d__c
right:
NUMBER: 40.0
otherwise:
status: "COMPLIANT"
currentStateMessage: 'The cluster is not underutilized.'