11-Oct-2023 10:05
Hi,
I am trying to automate one of my application scenario with F5 GTM.
I have listener which I created using REST API of F5. Now I want to setup a iRule (create iRule and apply it to the listener) through Rest API endpoint.
Can someone help me to figure out this?
12-Oct-2023 00:05
You can just attach the irule to the LTM virtual as the GTM/DNS listener is an actual LTM virtual server and there are a lot examples for that:
27-Oct-2023 12:16
Thank you! I got dragged to some other work. I will try this and update here if it works for me.
02-Nov-2023 12:03
I was able to add iRule. Now trying to attach that rule to Listener but getting error, Trying using this page: https://clouddocs.f5.com/cli/tmsh-reference/v13/modules/gtm/gtm_listener.html
Tried different ways but no success so far, Let me know what is wrong with my request:
1) First attempt:
{"name":"listener1.example.com","rules": {"name":"ruleTest"},"address":"<mylistenerIp>","sourceAddressTranslation": {"type":"automap"},"translateAddress":"enabled","translatePort":"enabled","enabled":true}
Error:
{"code":400,"message":"Found unexpected json pair at property /gtm/listener/~Common~listener1.example.com/rules. The json pair is \"name\":\"ecsRuleTest\".","errorStack":[],"apiError":1}