APIを使用して既存の構成パックを更新する
https://<ADM-endpoint-name>/stylebook/nitro/v2/config/configpacks/<configpack-ID>?mode=async
{
"configpack": {
"stylebook": {
"name": "waf-adv",
"namespace": "com.citrix.adc.stylebooks",
"version": "1.3"
},
"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"
}
}
}
},
"targets": [
{
"instance_id": "1b322685-3b23-4111-a9ce-56dd1c659e4c"
}
]
}
}
{
"job": {
"job_id": "1092579455"
}
}
https://<ADM-endpoint-name>/stylebook/nitro/v2/config/jobs/1092579455
{
"job": {
"job_id": "4268148987",
"status": "completed",
"progress_info": [
{
"is_last": "false",
"message": "Validated the parameters",
"status": "success"
},
{
"is_last": "false",
"message": "Configuration audit completed",
"status": "success"
},
{
"is_last": "false",
"message": "Computed configuration objects",
"status": "success"
},
{
"is_last": "false",
"message": "Prepared objects for applying configuration on 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Retrieved existing data for updatable objects on instance 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Applied configuration on instance 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Retrieved data for configuration audit on instance 192.168.153.165",
"status": "success"
},
{
"is_last": "false",
"message": "Logged out from instance 192.168.153.165",
"status": "success"
},
{
"is_last": "true",
"message": "Saved configpack.",
"status": "completed"
}
],
"result": {
"status": "completed",
"id": "4268148987",
"config_key": "4268148987",
"created_by": "nsroot",
"created_datetime": "2023-01-20 18:57:58.985435",
"created_datetimestamp": "2023-01-20 18:57:58",
"last_modified_by": "nsroot",
"last_modified_datetime": "2023-01-20 19:00:32",
"name": "sample-dns-stylebook",
"namespace": "com.citrix.adc.tests",
"version": "1.0"
}
}
}
APIを使用してターゲットインスタンスを更新する
targets セクションを変更します。
targets オブジェクトが変更され、新しいターゲットNetScalerが構成に追加されています。
{
"targets": [
{
"instance_id": "<Existing-ADC-instance-ID>"
},
{
"instance_id": "<New-ADC-instance-ID>"
}
],
}
targets オブジェクトを変更します。
targets オブジェクトを使用します。NetScaler Consoleの構成は保持されますが、以前に展開されていたすべてのNetScalerから削除されます。必要に応じて、構成を再度更新して1つまたは複数のターゲットを指定できます。
https://<ADM-endpoint-name>/stylebook/nitro/v2/config/configpacks/<configpack-ID>?mode=async
{
"configpack": {
"stylebook": {
"name": "waf-adv",
"namespace": "com.citrix.adc.stylebooks",
"version": "1.3"
},
"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"
}
}
}
},
"targets": []
}
}