Forum Discussion
Rest AP related IRule
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?
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:
- bindummawatAltostratus
Thank you! I got dragged to some other work. I will try this and update here if it works for me.
- bindummawatAltostratus
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}
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com