Forum Discussion

dfm61's avatar
dfm61
Icon for Nimbostratus rankNimbostratus
Jun 13, 2019

add to ASM policy description

Is it possible too 'add' to an existing security policy description keeping the existing description information? Either through iControl or using a tmsh command.

1 Reply

  • Not directly, but you can do it.

     

    >> TMSH

     

    • Get the old description.
    list asm policy TEST1 description
    asm policy TEST1 {
        description "my_old_description"
    }
    • Modify the description field.
    modify asm policy TEST1 description myold_description___my_new_description

     

    >> iControl REST

     

    • Get the policy code
    curl -sku admin:XXXX -X GET https://localhost/mgmt/tm/asm/policies | json-format | grep -A3 \"TEST1\"
          "name": "TEST1",
          "caseInsensitive": false,
          "loginPageReference": {
            "link": "https://localhost/mgmt/tm/asm/policies/dp1jS1FtctV2ubWCQe0Bhg/login-pages?ver\u003d12.1.4",
    • Get the old description.
    curl -sku admin:XXXX -X GET https://localhost/mgmt/tm/asm/policies/dp1jS1FtctV2ubWCQe0Bhg | json-format | grep description
      "description": "my_old_description",
    • Modify the description field.
    curl -sku admin:XXXX -X PATCH https://localhost/mgmt/tm/asm/policies/dp1jS1FtctV2ubWCQe0Bhg -H "Content-Type: application/json" -d '{"description": "myold_description___my_new_description"}' | json-format

     

    KR,

    Dario