样书配置

使用 API 更新现有的配置包

您可以使用样书 API 更新 ADM 中的现有配置包。

PUThttps://<ADM-endpoint-name>/stylebook/nitro/v2/config/configpacks/<configpack-ID>?mode=async

有效负载

{
    "configpack": {
        "parameters": {
            "name": "TestApp1",
            "lbname": "my-lbv",
            "waf-settings": {
                "rule": "true",
                "type": [
                    "HTML"
                ],
                "profile-settings": {
                    "logeverypolicyhit": false,
                    "enablesignatures": {
                        "signaturename": "waf-sign1"
                    },
                    "sqlinjection-settings": {
                        "sqlinjectionaction": [
                            "log",
                            "stats"
                        ],
                        "sqlinjection-default-settings": {
                            "sqlinjectiontransformspecialchars": true,
                            "sqlinjectionchecksqlwildchars": true,
                            "sqlinjectiontype": "SQLSplCharANDKeyword",
                            "sqlinjectionparsecomments": "checkall",
                            "sqlinjectiongrammar": "OFF"
                        }
                    },
                    "bufferoverflow-settings": {
                        "bufferoverflowaction": [
                            "log"
                        ],
                        "bufferoverflowmaxurllength": "2048",
                        "bufferoverflowmaxheaderlength": "4096",
                        "bufferoverflowmaxcookielength": "4096",
                        "bufferoverflowmaxquerylength": "65535",
                        "bufferoverflowmaxtotalheaderlength": "65535"
                    }
                }
            }
        },
        "config_key": "",
        "targets": [
            {
                "instance_id": "1b322685-3b23-4111-a9ce-56dd1c659e4c"
            }
        ],
        "stylebook": {
            "name": "waf-adv",
            "namespace": "com.citrix.adc.stylebooks",
            "version": "1.3"
        }
    }
}
<!--NeedCopy-->

使用 API 更新目标实例

在更新配置包负载中,更改 targets 部分以添加、删除或替换 ADC 实例。

示例

{
    "targets": [
        {
            "instance_id": "Existing-ADC-instance-ID"
        },
        {
            "instance_id": "New-ADC-instance-ID"
        }
    ],
}
<!--NeedCopy-->
使用 API 更新现有的配置包