$ ansible-doc -t module cisco.sccfm.get_object
> MODULE cisco.sccfm.get_object (sccfm-ansible/plugins/modules/get_object.py)
Retrieve the full details of an object by UID.
Returns the default value, all device-specific overrides, and the
list of attached devices.
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
- 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 object to retrieve.
type: str
AUTHOR: Cisco SCCFM Team
EXAMPLES:
# Example 1: Get object details by UID
- name: Get object
cisco.sccfm.get_object:
uid: "fd526e22-12ff-4fa0-a88d-7375c5d1e144"
region: "{{ sccfm_region }}"
api_token: "{{ sccfm_api_token }}"
register: obj
- name: Show object
ansible.builtin.debug:
var: obj.object
# Example 2: Using module_defaults
- name: Inspect object before modifying overrides
hosts: localhost
gather_facts: false
module_defaults:
group/cisco.sccfm.all:
region: "{{ sccfm_region }}"
api_token: "{{ lookup('env', 'SCCFM_API_TOKEN') }}"
tasks:
- name: Get object details
cisco.sccfm.get_object:
uid: "{{ object_uid }}"
register: obj_result
- name: Show default value
ansible.builtin.debug:
msg: "Default value: {{ obj_result.object.default_value }}"
RETURN VALUES:
- object Full details of the object.
Returned keys include `uid', `name', `description',
`object_type', `default_value', `overrides', and `targets'.
returned: success
type: dict
contains:
- default_value The default content value of the object.
type: str
- name Name of the object.
type: str
- object_type Type of the object (e.g., NETWORK_OBJECT,
URL_OBJECT).
type: str
- overrides List of device-specific overrides.
elements: dict
type: list
contains:
- target_id UID of the target device.
type: str
- value Override value for that device.
type: str
- targets List of devices the object is attached to.
Each target can include `id', `display_name', and
`type'.
elements: dict
type: list
contains:
- display_name Display name of the device.
type: str
- id UID of the device.
type: str
- uid Unique identifier of the object.
type: str