π§ AWS WorkSpace is unused - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml - Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π AWS WorkSpace
- π AWS WorkSpace - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2026-02-10T22:33:23.288513525Z Open
| Result | Id | Condition Index | Condition Text | Runtime Error |
|---|---|---|---|---|
| π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
| π’ | test2 | βοΈ 199 | βοΈ extract('CA10__state__c') != 'AVAILABLE' && extract('CA10__state__c') != 'STOPPED' | βοΈ null |
| π’ | test3 | βοΈ 299 | βοΈ extract('CA10__lastKnownUserConnectionTimestamp__c').isEmpty() | βοΈ null |
| π’ | test4 | βοΈ 399 | βοΈ extract('CA10__lastKnownUserConnectionTimestamp__c').beyondLastDays(30) | βοΈ null |
| π’ | test5 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
| File | MD5 | |
|---|---|---|
| Open | /ce/ca/aws/workspaces/workspace-unused/policy.yaml | D04FBBA061DB0A01179EE0D04F75D76D |
| Open | /ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml | D3854921B10D1922603282CFBCF5ED9E |
| Open | /ce/ca/aws/workspaces/workspace-unused/test-data.json | 5D59FA365188C2CECFF9D5602189E3D5 |
| Open | /types/CA10__CaAwsWorkspace__c/object.extracts.yaml | 653A7214D9FA947DB5A00F602EFFCB5C |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/aws/workspaces/workspace-unused/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAwsWorkspace__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10__CaAwsWorkspace__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The WorkSpace is in a transient state."
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10__state__c"
right:
TEXT: "AVAILABLE"
- NOT_EQUAL:
left:
EXTRACT: "CA10__state__c"
right:
TEXT: "STOPPED"
- status: "INCOMPLIANT"
currentStateMessage: "The last user connection time for the WorkSpace is unknown."
remediationMessage: "Terminate the unused WorkSpace."
check:
IS_EMPTY:
arg:
EXTRACT: "CA10__lastKnownUserConnectionTimestamp__c"
- status: "INCOMPLIANT"
currentStateMessage: "The WorkSpace has not been used in the last 30 days."
remediationMessage: "Terminate the unused WorkSpace."
check:
IS_BEYOND_LAST_DAYS:
offsetDays: 30
arg:
EXTRACT: "CA10__lastKnownUserConnectionTimestamp__c"
otherwise:
status: "COMPLIANT"
currentStateMessage: "The WorkSpace has been used within the last 30 days."