Debian Codegraph @

ansible_collections/cisco/meraki/plugins/modules/organizations_inventory_claim.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: organizations_inventory_claim
9 short_description: Resource module for organizations _inventory _claim
10 description:
11 - Manage operation create of the resource organizations _inventory _claim.
12 - >
13 Claim a list of devices, licenses, and/or orders into an organization inventory.
14 When claiming by order, all devices and licenses in the order will be claimed;
15 licenses will be added to the organization and devices will be placed in the organization's
16 inventory. This operation can be used up to ten times within a single five minute
17 window.
18 version_added: '1.0.0'
19 extends_documentation_fragment:
20 - cisco.meraki.module
21 author: Francisco Munoz (@fmunoz)
22 options:
23 licenses:
24 description: The licenses that should be claimed.
25 elements: dict
26 suboptions:
27 key:
28 description: The key of the license.
29 type: str
30 mode:
31 description: Co-term licensing only either 'renew' or 'addDevices'. 'addDevices'
32 will increase the license limit, while 'renew' will extend the amount of
33 time until expiration. Defaults to 'addDevices'. All licenses must be claimed
34 with the same mode, and at most one renewal can be claimed at a time. Does
35 not apply to organizations using per-device licensing model.
36 type: str
37 type: list
38 orders:
39 description: The numbers of the orders that should be claimed.
40 elements: str
41 type: list
42 organizationId:
43 description: OrganizationId path parameter. Organization ID.
44 type: str
45 serials:
46 description: The serials of the devices that should be claimed.
47 elements: str
48 type: list
49 requirements:
50 - meraki >= 2.4.9
51 - python >= 3.5
52 seealso:
53 - name: Cisco Meraki documentation for organizations claimIntoOrganizationInventory
54 description: Complete reference of the claimIntoOrganizationInventory API.
55 link: https://developer.cisco.com/meraki/api-v1/#!claim-into-organization-inventory
56 notes:
57 - SDK Method used are
58 organizations.Organizations.claim_into_organization_inventory,
59 - Paths used are
60 post /organizations/{organizationId}/inventory/claim,
61 """
62
63 EXAMPLES = r"""
64 - name: Create
65 cisco.meraki.organizations_inventory_claim:
66 meraki_api_key: "{{ meraki_api_key }}"
67 meraki_base_url: "{{ meraki_base_url }}"
68 meraki_single_request_timeout: "{{ meraki_single_request_timeout }}"
69 meraki_certificate_path: "{{ meraki_certificate_path }}"
70 meraki_requests_proxy: "{{ meraki_requests_proxy }}"
71 meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}"
72 meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}"
73 meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}"
74 meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}"
75 meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}"
76 meraki_maximum_retries: "{{ meraki_maximum_retries }}"
77 meraki_output_log: "{{ meraki_output_log }}"
78 meraki_log_file_prefix: "{{ meraki_log_file_prefix }}"
79 meraki_log_path: "{{ meraki_log_path }}"
80 meraki_print_console: "{{ meraki_print_console }}"
81 meraki_suppress_logging: "{{ meraki_suppress_logging }}"
82 meraki_simulate: "{{ meraki_simulate }}"
83 meraki_be_geo_id: "{{ meraki_be_geo_id }}"
84 meraki_caller: "{{ meraki_caller }}"
85 meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}"
86 meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}"
87 licenses:
88 - key: Z2XXXXXXXXXX
89 mode: addDevices
90 orders:
91 - 4CXXXXXXX
92 organizationId: string
93 serials:
94 - Q234-ABCD-5678
95 """
96 RETURN = r"""
97 meraki_response:
98 description: A dictionary or list with the response returned by the Cisco Meraki Python SDK
99 returned: always
100 type: dict
101 sample: >
102 {
103 "orders": [
104 "string"
105 ],
106 "serials": [
107 "string"
108 ],
109 "licenses": [
110 {
111 "key": "string",
112 "mode": "string"
113 }
114 ]
115 }
116 """