$ ansible-doc -t module cisco.sccfm.show_asa_shun
> MODULE cisco.sccfm.show_asa_shun (sccfm-ansible/plugins/modules/show_asa_shun.py)
Lists active shun entries on one or more ASA devices managed by SCC
Firewall Manager.
Executes `show shun' on the target devices and returns structured
data with interface, source/destination IP, ports, and protocol.
When `statistics' is set to `true', executes `show shun statistics'
instead and returns per-interface shun/received counters.
Devices can be selected by a Lucene query or by specifying a list of
UIDs.
See
https://developer.cisco.com/docs/cisco-security-cloud-control-firewall-manager/execute-cli-command/
for API documentation.
OPTIONS (= indicates it is required):
- api_token API token for SCCFM.
set_via:
env:
- name: SCCFM_API_TOKEN
default: null
no_log: true
type: str
- limit Maximum number of devices to return when using `query'.
Ignored when using `uids'.
default: 50
type: int
- offset Pagination offset when using `query'.
Ignored when using `uids'.
default: 0
type: int
- query Lucene query to filter ASA devices.
Mutually exclusive with `uids'.
The query is automatically combined with `deviceType:ASA'.
default: null
type: str
- region SCCFM region (int, us, eu, apj, au, uae, in, or ci).
set_via:
env:
- name: SCCFM_REGION
default: null
type: str
- statistics When `true', show per-interface shun statistics instead
of shun entries.
default: false
type: bool
- uids List of device UIDs to query.
Mutually exclusive with `query'.
default: null
elements: str
type: list
AUTHOR: Cisco SCCFM Team
EXAMPLES:
# Example 1: Show shun entries on devices matching a query
- name: Show shun entries on production ASAs
cisco.sccfm.show_asa_shun:
query: "name:prod-* AND connectivityState:ONLINE"
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
register: shun_entries
# Example 2: Show shun entries on specific devices by UID
- name: Show shun entries on specific ASAs
cisco.sccfm.show_asa_shun:
uids:
- "12345678-1234-1234-1234-123456789abc"
register: shun_entries
# Example 3: Show shun statistics
- name: Show shun statistics on ASAs
cisco.sccfm.show_asa_shun:
query: "connectivityState:ONLINE"
statistics: true
register: shun_stats
# Example 4: Using module_defaults (recommended)
- name: Show shun info
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
tasks:
- name: Show shun entries
cisco.sccfm.show_asa_shun:
query: "connectivityState:ONLINE"
register: shun_entries
- name: Show shun statistics
cisco.sccfm.show_asa_shun:
query: "connectivityState:ONLINE"
statistics: true
register: shun_stats
RETURN VALUES:
- results List of shun entries or statistics found on the target
devices. The structure depends on the `statistics' flag.
elements: dict
returned: success
type: list
contains:
- destination_ip The destination IP address (entries only).
type: str
- destination_port The destination port (entries only).
type: int
- device_uid The UID of the device.
type: str
- interface The interface name (returned for both entries
and statistics).
type: str
- protocol The IP protocol number (entries only).
type: int
- received Number of received packets on this interface
(statistics only).
type: int
- shunned Number of shunned connections on this interface
(statistics only).
type: int
- source_ip The shunned source IP address (entries only).
type: str
- source_port The source port (entries only).
type: int