Clearing ACLs
This section contains payload examples and CLIs to demonstrate how to use the NX-API REST API to clear ACLs on Cisco Nexus 3000 and 9000 Series switches and to show how the REST APIs correspond to the CLI commands. For more information, see the Cisco Nexus 9000 Series NX-OS Security Configuration Guide, Release 7.x.
Clearing an IPv4 Access List
Clearing an IPv4 Access List
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4.json
{
"ipv4aclAF": {
"children": [
{
"aclStatClear": {
"attributes": {
"name": "Count1"
}}}]}}
{
imdata": []
}
<System>
<acl-items>
<ipv4-items>
<statClear-items>
<name>Count1</name>
</statClear-items>
</ipv4-items>
</acl-items>
</System>
Clears an IPv4 access list.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
clear ip access-list counters Count1
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Clearing an IPv6 Access List
Clearing an IPv6 Access List
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv6.json
{
"ipv6aclAF": {
"children": [
{
"aclStatClear": {
"attributes": {
"name": "Count2"
}}}]}}
{
imdata": []
}
<System>
<acl-items>
<ipv6-items>
<statClear-items>
<name>Count2</name>
</statClear-items>
</ipv6-items>
</acl-items>
</System>
Clears an IPv6 access list.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
clear ipv6 access-list counters Count2
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html