π§ Azure PostgreSQL Flexible Server connection_throttle.enable Parameter is not set to ON - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml
- Located in: π Azure PostgreSQL Flexible Server connection_throttle.enable Parameter is not set to ON π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure PostgreSQL Server | CA10Z1__CaAzurePostgreSqlServer__c | 7 | 1 | 9 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:45:38.200195188Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10Z1__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 399 | βοΈ extract('caJsonFrom__configurations__c').jsonQueryText('[? name == \'connection_throttle.enable\'].value | [0]') == 'on' | βοΈ null |
π’ | test3 | βοΈ 299 | βοΈ extract('caJsonFrom__configurations__c').jsonQueryText('[? name == \'connection_throttle.enable\'].value | [0]') == 'off' | βοΈ null |
π’ | test4 | βοΈ 400 | βοΈ otherwise | βοΈ null |
π’ | test5 | βοΈ 201 | βοΈ CA10Z1__configurations__c.delegatedTo(CA10Z1__configurations__c).isEmpty() | βοΈ null |
π’ | test6 | βοΈ 199 | βοΈ extract('CA10Z1__deploymentMode__c') != 'Flexible' | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/policy.yaml | BF453A51237813AA9ED8A4E16D850B5B |
Open | /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml | 570992A96BF3D5C1A3E0DFDCDF76CE7E |
Open | /types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml | 08BBA6DB6D72395AA7E05F67B74F9223 |
Open | /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/test-data.json | 088C0A721691CB0D421AF8FDF25DBE64 |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/postgresql-database/flexible-server-connection-throttle-enable-parameter/prod.logic.yaml
Contentβ
---
inputType: "CA10Z1__CaAzurePostgreSqlServer__c"
testData:
- file: "test-data.json"
importExtracts:
- file: "/types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is not the Flexible Server deployment mode."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__deploymentMode__c"
right:
TEXT: "Flexible"
- status: "INCOMPLIANT"
currentStateMessage: "PostgreSQL Server connection_throttle.enable configuration is not enabled."
remediationMessage: "Consider enabling PostgreSQL Flexible Server connection_throttle.enable configuration."
check:
IS_EQUAL:
left:
JSON_QUERY_TEXT:
arg:
EXTRACT: "caJsonFrom__configurations__c"
expression: "[? name == 'connection_throttle.enable'].value | [0]"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
right:
TEXT: "off"
- status: "COMPLIANT"
currentStateMessage: "PostgreSQL Flexible Server connection_throttle.enable configuration is enabled."
check:
IS_EQUAL:
left:
JSON_QUERY_TEXT:
arg:
EXTRACT: "caJsonFrom__configurations__c"
expression: "[? name == 'connection_throttle.enable'].value | [0]"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
right:
TEXT: "on"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."