使用 API 更新自定义样书
您可以使用 API 更新自定义样书。更新样书时,可以在不更改样书版本的情况下对其进行更改。您也可以更新从样书包中导入的定义。
POST:https://<ADM-endpoint-name>/stylebook/nitro/v2/config/stylebooks/<Namespace>/<version>/<Name>/actions/update?mode=async
有效负载:
{
"update": {
"source": "--- \nname: lb-test\nnamespace: com.citrix.adc.test\nversion: "1.0"\ndescription: "This stylebook defines the parameters for a load balancing virtual server."\ndisplay-name: "LB VServer Configuration"\nschema-version: "1.0"\nimport-stylebooks:\n -\n namespace: netscaler.nitro.config\n prefix: ns\n version: "13.0"\n\nparameters:\n -\n name: lbname\n label: "LB Vserver Name"\n type: string\n required: true\n -\n name: lb-vip\n label: "LB Vserver IP Address"\n type: ipaddress\n required: true\n - \n name: port\n label: "Vserver Port"\n description: "Port number for the virtual server."\n type: tcp-port\n gui:\n updatable: false\n default: 80\n - \n name: servicetype\n label: "Service Type"\n description: "Protocol used by the virtual server"\n type: string\n default: HTTP\n required: true\n allowed-values: \n - "HTTP"\n - "FTP"\n - "TCP"\n - "UDP"\n - "SSL"\n - \n name: lbmethod\n label: "LB Method"\n description: "Load Balancing Method used by this Virtual Server"\n type: string\n \ncomponents:\n -\n name: lbvserver-1-comp\n type: ns::lbvserver\n properties:\n name: $parameters.lbname\n ipv46?: $parameters.lb-vip\n port?: $parameters.port\n servicetype: $parameters.servicetype\n lbmethod?: $parameters.lbmethod"
}
}
<!--NeedCopy-->
使用 API 更新自定义样书
已复制!
失败!