Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_sensor_relationships.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # Copyright (c) 2021, Cisco Systems
5 # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 DOCUMENTATION = r"""
8 module: devices_sensor_relationships
9 short_description: Resource module for devices _sensor _relationships
10 description:
11 - Manage operation update of the resource devices _sensor _relationships.
12 - Assign one or more sensor roles to a given sensor or camera device.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 livestream:
19 description: A role defined between an MT sensor and an MV camera that adds the
20 camera's livestream to the sensor's details page. Snapshots from the camera
21 will also appear in alert notifications that the sensor triggers.
22 suboptions:
23 relatedDevices:
24 description: An array of the related devices for the role.
25 elements: dict
26 suboptions:
27 serial:
28 description: The serial of the related device.
29 type: str
30 type: list
31 type: dict
32 serial:
33 description: Serial path parameter.
34 type: str
35 requirements:
36 - meraki >= 2.4.9
37 - python >= 3.5
38 seealso:
39 - name: Cisco Meraki documentation for sensor updateDeviceSensorRelationships
40 description: Complete reference of the updateDeviceSensorRelationships API.
41 link: https://developer.cisco.com/meraki/api-v1/#!update-device-sensor-relationships
42 notes:
43 - SDK Method used are
44 sensor.Sensor.update_device_sensor_relationships,
45 - Paths used are
46 put /devices/{serial}/sensor/relationships,
47 """
48
49 EXAMPLES = r"""
50 - name: Update all
51 cisco.meraki.devices_sensor_relationships:
52 meraki_api_key: "{{ meraki_api_key }}"
53 meraki_base_url: "{{ meraki_base_url }}"
54 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
55 meraki_certificate_path: "{{ meraki_certificate_path }}"
56 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
57 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
58 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
59 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
60 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
61 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
62 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
63 meraki_output_log: "{{ meraki_output_log }}"
64 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
65 meraki_log_path: "{{ meraki_log_path }}"
66 meraki_print_console: "{{ meraki_print_console }}"
67 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
68 meraki_simulate: "{{ meraki_simulate }}"
69 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
70 meraki_caller: "{{ meraki_caller }}"
71 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
72 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
73 state: present
74 livestream:
75 relatedDevices:
76 - serial: string
77 serial: string
78 """
79 RETURN = r"""
80 meraki_response:
81 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
82 returned: always
83 type: dict
84 sample: >
85 {
86 "relatedDevices": [
87 {
88 "serial": "string",
89 "productType": "string"
90 }
91 ]
92 }
93 """