$ ansible-doc -t module cisco.sccfm.delete_network_object
> MODULE cisco.sccfm.delete_network_object (sccfm-ansible/plugins/modules/delete_network_object.py)
Delete a network object from your SCC Firewall Manager tenant.
Objects can be deleted by either UID or name.
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
- name Name of the network object to delete.
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
- uid Unique identifier (UID) of the network object to delete.
default: null
type: str
NOTES:
* Either `uid' or `name' must be provided, but not both.
* When using `name', the module will search for the object
and resolve it to a UID before deletion.
AUTHOR: Cisco SCCFM Team
EXAMPLES:
# Example 1: Delete a network object by UID
- name: Delete network object by UID
cisco.sccfm.delete_network_object:
uid: "abc-123-def-456"
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
# Example 2: Delete a network object by name
- name: Delete network object by name
cisco.sccfm.delete_network_object:
name: "old-web-server"
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
# Example 3: Delete multiple objects using module_defaults
- name: Delete network objects
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
region: "{{ sccfm_region }}"
api_token: "{{ lookup('env', 'SCCFM_API_TOKEN') }}"
tasks:
- name: Delete obsolete network objects
cisco.sccfm.delete_network_object:
name: "{{ item }}"
loop:
- old-server-01
- old-server-02
- deprecated-subnet
# Example 4: Using environment variables (SCCFM_REGION and SCCFM_API_TOKEN)
- name: Delete a network object
cisco.sccfm.delete_network_object:
name: "temporary-host"
RETURN VALUES:
- deleted_uid The UID of the deleted network object, or null if
already absent.
returned: always
sample: abc-123-def-456
type: str