1 ## Velocity template for creating the payload for creating A1 policy type
4 #set($entries=$ctx.getAttribute("create-policy-type-input.properties_length"))
5 #set($endCntr1=$endCntr1.parseInt($entries))
6 #set( $endCntr1 = $endCntr1 - 1)
8 "description": "$ctx.getAttribute("create-policy-type-input.description")",
9 "name": "$ctx.getAttribute("create-policy-type-input.name")",
10 "policy_type_id": $ctx.getAttribute("create-policy-type-input.policy-type-id"),
12 "$schema": "http://json-schema.org/draft-07/schema#",
13 "additionalProperties": false,
15 "properties": {#foreach($no1 in [$begCntr1..$endCntr1])
16 "$ctx.getAttribute("create-policy-type-input.properties[$no1].property-name")" : {
19 #set($entries=$ctx.getAttribute("create-policy-type-input.properties[$no1].policy-statements_length"))
20 #set($endCntr2=$endCntr2.parseInt($entries))
21 #set( $endCntr2 = $endCntr2 - 1)
22 #foreach($no2 in [$begCntr2..$endCntr2])
23 "$ctx.getAttribute("create-policy-type-input.properties[$no1].policy-statements[$no2].policy-statement")" :
24 "$ctx.getAttribute("create-policy-type-input.properties[$no1].policy-statements[$no2].policy-statement-value")"
25 #if( $no2 < $endCntr2), #end#end}#if( $no1 < $endCntr1), #end #end