meraki_webhook – Manage webhooks configured in the Meraki cloud

New in version 2.9.

Synopsis

  • Configure and query information about webhooks within the Meraki cloud.

Parameters

Parameter Choices/Defaults Comments
auth_key
string / required
Authentication key provided by the dashboard. Required if environmental variable MERAKI_KEY is not set.
host
string
Default:
"api.meraki.com"
Hostname for Meraki dashboard.
Can be used to access regional Meraki environments, such as China.
internal_error_retry_time
integer
Default:
60
Number of seconds to retry if server returns an internal server error.
name
string
Name of webhook.
net_id
string
ID of network which configuration is applied to.
net_name
string
Name of network which configuration is applied to.

aliases: network
org_id
string
ID of organization.
org_name
string
Name of organization.

aliases: organization
output_format
string
    Choices:
  • snakecase ←
  • camelcase
Instructs module whether response keys should be snake case (ex. net_id) or camel case (ex. netId).
output_level
string
    Choices:
  • debug
  • normal ←
Set amount of debug output during module execution.
rate_limit_retry_time
integer
Default:
165
Number of seconds to retry if rate limiter is triggered.
shared_secret
string
Secret password to use when accessing webhook.
state
string
    Choices:
  • absent
  • present
  • query ←
Specifies whether object should be queried, created/modified, or removed.
test
string
    Choices:
  • test
  • status
Indicates whether to test or query status.
test_id
string
ID of webhook test query.
timeout
integer
Default:
30
Time to timeout for HTTP requests.
url
string
URL to access when calling webhook.
use_https
boolean
    Choices:
  • no
  • yes ←
If no, it will use HTTP. Otherwise it will use HTTPS.
Only useful for internal Meraki developers.
use_proxy
boolean
    Choices:
  • no
  • yes
If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts.
validate_certs
boolean
    Choices:
  • no
  • yes ←
Whether to validate HTTP certificates.
webhook_id
string
Unique ID of webhook.

Notes

Note

  • Some of the options are likely only used for developers within Meraki.
  • More information about the Meraki API can be found at https://dashboard.meraki.com/api_docs.
  • Some of the options are likely only used for developers within Meraki.
  • As of Ansible 2.9, Meraki modules output keys as snake case. To use camel case, set the ANSIBLE_MERAKI_FORMAT environment variable to camelcase.
  • Ansible’s Meraki modules will stop supporting camel case output in Ansible 2.13. Please update your playbooks.

Examples

- name: Create webhook
  meraki_webhook:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_name: YourNet
    name: Test_Hook
    url: https://webhook.url/
    shared_secret: shhhdonttellanyone
  delegate_to: localhost

- name: Query one webhook
  meraki_webhook:
    auth_key: abc123
    state: query
    org_name: YourOrg
    net_name: YourNet
    name: Test_Hook
  delegate_to: localhost

- name: Query all webhooks
  meraki_webhook:
    auth_key: abc123
    state: query
    org_name: YourOrg
    net_name: YourNet
  delegate_to: localhost

- name: Delete webhook
  meraki_webhook:
    auth_key: abc123
    state: absent
    org_name: YourOrg
    net_name: YourNet
    name: Test_Hook
  delegate_to: localhost

- name: Test webhook
  meraki_webhook:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_name: YourNet
    test: test
    url: https://webhook.url/abc123
  delegate_to: localhost

- name: Get webhook status
  meraki_webhook:
    auth_key: abc123
    state: present
    org_name: YourOrg
    net_name: YourNet
    test: status
    test_id: abc123531234
  delegate_to: localhost

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
data
complex
success
List of administrators.

  id
string
success
Unique ID of webhook.

Sample:
aHR0cHM6Ly93ZWJob22LnvpdGUvOGViNWI3NmYtYjE2Ny00Y2I4LTlmYzQtND32Mj3F5NzIaMjQ0
  name
string
success
Descriptive name of webhook.

Sample:
Test_Hook
  networkId
string
success
ID of network containing webhook object.

Sample:
N_12345
  shared_secret
string
success
Password for webhook.

Sample:
VALUE_SPECIFIED_IN_NO_LOG_PARAMETER
  status
string
success, when testing webhook
Status of webhook test.

Sample:
enqueued
  url
string
success
URL of webhook endpoint.

Sample:
https://webhook.url/abc123


Status

Authors

  • Kevin Breit (@kbreit)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.