Forum Discussion

Oberschmidt's avatar
Oberschmidt
Icon for Nimbostratus rankNimbostratus
Aug 01, 2025
Solved

AS3 for ASM Policy Creation

I'm trying to use AS3 for being able to automate just the security policy creation, I've managed to get a declarative statment to do it all with creating a VIP and Tenant but I don't want to create all that, I want to just be creating the ASM Security Policy based on a template in the tenant I specify. 

 

{
    "class": "AS3",
    "action": "deploy",
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.0.0",
        "id": "transparent_waf_policy_only_declaration",
        "label": "Transparent WAF Policy Only Deployment",
        "remark": "Deploys only a transparent WAF policy object within a new tenant and application.",
        "Common": {
            "class": "Tenant",
            "MyWAFPolicyApplication": {
                "class": "Application",
                "template": "generic",
                "Transparent_Security_Policy": {
                    "class": "WAF_Policy",
                    "enforcementMode": "transparent",
                    "template": {
                        "use": "POLICY_TEMPLATE_FUNDAMENTAL"
                    },
                    "description": "A standalone transparent WAF policy for monitoring purposes."
                }
            }
        }
    }
}

 

 

response is {
  "code": 422,
  "message": "Invalid data property: [object Object]"
}

2 Replies