The API commands in the vCenter Server Appliance let you perform
various administrative tasks in the vCenter Server Appliance. The API
commands are provided by appliance management service in the vCenter
Server Appliance. You can edit time synchronization settings, monitor
processes and services, set up the SNMP settings, firewall and so on.
Here is step by step of how to execute API Commands:-
1. Access vCSA Shell Locally (Alt+F1) or through SSH
2. Enable the vCSA Shell by using this command or through vCSA DCUI:-
shell.set --enabled true
3. Run this command to list all API commands:-
help api list
4. Let's assume you want to check firewall rule those are created on vCenter Run this API command:-
com.vmware.appliance.version1.networking.firewall.addr.inbound.list
5. I have one rule in vCenter. Now if you want to delete these rules you can execute this API Command:-
com.vmware.appliance.version1.networking.firewall.addr.inbound.delete --position INT
Replace INT with Rule Integer Value
Example:-
com.vmware.appliance.version1.networking.firewall.addr.inbound.delete --position 0
Note:- if you need help on any API command then use this:-
<API Command> --help
For more info on API Commands in vCSA refer VMware Documentation
1. Access vCSA Shell Locally (Alt+F1) or through SSH
2. Enable the vCSA Shell by using this command or through vCSA DCUI:-
shell.set --enabled true
3. Run this command to list all API commands:-
help api list
4. Let's assume you want to check firewall rule those are created on vCenter Run this API command:-
com.vmware.appliance.version1.networking.firewall.addr.inbound.list
5. I have one rule in vCenter. Now if you want to delete these rules you can execute this API Command:-
com.vmware.appliance.version1.networking.firewall.addr.inbound.delete --position INT
Replace INT with Rule Integer Value
Example:-
com.vmware.appliance.version1.networking.firewall.addr.inbound.delete --position 0
Note:- if you need help on any API command then use this:-
<API Command> --help
For more info on API Commands in vCSA refer VMware Documentation
No comments:
Post a Comment