| 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_camera_custom_analytics_artifacts |
| 9 |
short_description: Resource module for organizations _camera _customanalytics _artifacts |
| 10 |
description: |
| 11 |
- Manage operations create and delete of the resource organizations _camera _customanalytics |
| 12 |
_artifacts. |
| 13 |
- > |
| 14 |
Create custom analytics artifact. Returns an artifact upload URL with expiry time. |
| 15 |
Upload the artifact file with a put request to the returned upload URL before |
| 16 |
its expiry. |
| 17 |
- Delete Custom Analytics Artifact. |
| 18 |
version_added: '1.0.0' |
| 19 |
extends_documentation_fragment: |
| 20 |
- cisco.meraki.module |
| 21 |
author: Francisco Munoz (@fmunoz) |
| 22 |
options: |
| 23 |
artifactId: |
| 24 |
description: ArtifactId path parameter. Artifact ID. |
| 25 |
type: str |
| 26 |
name: |
| 27 |
description: Unique name of the artifact. |
| 28 |
type: str |
| 29 |
organizationId: |
| 30 |
description: OrganizationId path parameter. Organization ID. |
| 31 |
type: str |
| 32 |
requirements: |
| 33 |
- meraki >= 2.4.9 |
| 34 |
- python >= 3.5 |
| 35 |
seealso: |
| 36 |
- name: Cisco Meraki documentation for camera createOrganizationCameraCustomAnalyticsArtifact |
| 37 |
description: Complete reference of the createOrganizationCameraCustomAnalyticsArtifact |
| 38 |
API. |
| 39 |
link: https://developer.cisco.com/meraki/api-v1/#!create-organization-camera-custom-analytics-artifact |
| 40 |
- name: Cisco Meraki documentation for camera deleteOrganizationCameraCustomAnalyticsArtifact |
| 41 |
description: Complete reference of the deleteOrganizationCameraCustomAnalyticsArtifact |
| 42 |
API. |
| 43 |
link: https://developer.cisco.com/meraki/api-v1/#!delete-organization-camera-custom-analytics-artifact |
| 44 |
notes: |
| 45 |
- SDK Method used are |
| 46 |
camera.Camera.create_organization_camera_custom_analytics_artifact, |
| 47 |
camera.Camera.delete_organization_camera_custom_analytics_artifact, |
| 48 |
- Paths used are |
| 49 |
post /organizations/{organizationId}/camera/customAnalytics/artifacts, |
| 50 |
delete /organizations/{organizationId}/camera/customAnalytics/artifacts/{artifactId}, |
| 51 |
""" |
| 52 |
|
| 53 |
EXAMPLES = r""" |
| 54 |
- name: Create |
| 55 |
cisco.meraki.organizations_camera_custom_analytics_artifacts: |
| 56 |
meraki_api_key: "{{ meraki_api_key }}" |
| 57 |
meraki_base_url: "{{ meraki_base_url }}" |
| 58 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 59 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 60 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 61 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 62 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 63 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 64 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 65 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 66 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 67 |
meraki_output_log: "{{ meraki_output_log }}" |
| 68 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 69 |
meraki_log_path: "{{ meraki_log_path }}" |
| 70 |
meraki_print_console: "{{ meraki_print_console }}" |
| 71 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 72 |
meraki_simulate: "{{ meraki_simulate }}" |
| 73 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 74 |
meraki_caller: "{{ meraki_caller }}" |
| 75 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 76 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 77 |
state: present |
| 78 |
name: example |
| 79 |
organizationId: string |
| 80 |
- name: Delete by id |
| 81 |
cisco.meraki.organizations_camera_custom_analytics_artifacts: |
| 82 |
meraki_api_key: "{{ meraki_api_key }}" |
| 83 |
meraki_base_url: "{{ meraki_base_url }}" |
| 84 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 85 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 86 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 87 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 88 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 89 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 90 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 91 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 92 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 93 |
meraki_output_log: "{{ meraki_output_log }}" |
| 94 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 95 |
meraki_log_path: "{{ meraki_log_path }}" |
| 96 |
meraki_print_console: "{{ meraki_print_console }}" |
| 97 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 98 |
meraki_simulate: "{{ meraki_simulate }}" |
| 99 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 100 |
meraki_caller: "{{ meraki_caller }}" |
| 101 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 102 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 103 |
state: absent |
| 104 |
artifactId: string |
| 105 |
organizationId: string |
| 106 |
""" |
| 107 |
RETURN = r""" |
| 108 |
meraki_response: |
| 109 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 110 |
returned: always |
| 111 |
type: dict |
| 112 |
sample: > |
| 113 |
{ |
| 114 |
"artifactId": "string", |
| 115 |
"organizationId": "string", |
| 116 |
"name": "string", |
| 117 |
"status": { |
| 118 |
"type": "string", |
| 119 |
"message": "string" |
| 120 |
}, |
| 121 |
"uploadId": "string", |
| 122 |
"uploadUrl": "string", |
| 123 |
"uploadUrlExpiry": "string" |
| 124 |
} |
| 125 |
""" |