Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/devices_sensor_commands.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_commands
9 short_description: Resource module for devices _sensor _commands
10 description:
11 - Manage operation create of the resource devices _sensor _commands.
12 - Sends a command to a sensor.
13 version_added: '1.0.0'
14 extends_documentation_fragment:
15 - cisco.meraki.module
16 author: Francisco Munoz (@fmunoz)
17 options:
18 operation:
19 description: Operation to run on the sensor. 'enableDownstreamPower', 'disableDownstreamPower',
20 and 'cycleDownstreamPower' turn power on/off to the device that is connected
21 downstream of an MT40 power monitor. 'refreshData' causes an MT15 or MT40 device
22 to upload its latest readings so that they are immediately available in the
23 Dashboard API.
24 type: str
25 serial:
26 description: Serial path parameter.
27 type: str
28 requirements:
29 - meraki >= 2.4.9
30 - python >= 3.5
31 seealso:
32 - name: Cisco Meraki documentation for sensor createDeviceSensorCommand
33 description: Complete reference of the createDeviceSensorCommand API.
34 link: https://developer.cisco.com/meraki/api-v1/#!create-device-sensor-command
35 notes:
36 - SDK Method used are
37 sensor.Sensor.create_device_sensor_command,
38 - Paths used are
39 post /devices/{serial}/sensor/commands,
40 """
41
42 EXAMPLES = r"""
43 - name: Create
44 cisco.meraki.devices_sensor_commands:
45 meraki_api_key: "{{ meraki_api_key }}"
46 meraki_base_url: "{{ meraki_base_url }}"
47 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
48 meraki_certificate_path: "{{ meraki_certificate_path }}"
49 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
50 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
51 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
52 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
53 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
54 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
55 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
56 meraki_output_log: "{{ meraki_output_log }}"
57 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
58 meraki_log_path: "{{ meraki_log_path }}"
59 meraki_print_console: "{{ meraki_print_console }}"
60 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
61 meraki_simulate: "{{ meraki_simulate }}"
62 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
63 meraki_caller: "{{ meraki_caller }}"
64 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
65 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
66 state: present
67 operation: disableDownstreamPower
68 serial: string
69 """
70 RETURN = r"""
71 meraki_response:
72 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
73 returned: always
74 type: dict
75 sample: >
76 {
77 "commandId": "string",
78 "createdAt": "string",
79 "completedAt": "string",
80 "createdBy": {
81 "adminId": "string",
82 "name": "string",
83 "email": "string"
84 },
85 "operation": "string",
86 "status": "string",
87 "errors": [
88 "string"
89 ]
90 }
91 """