| 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_saml_idps |
| 9 |
short_description: Resource module for organizations _saml _idps |
| 10 |
description: |
| 11 |
- Manage operations create, update and delete of the resource organizations _saml |
| 12 |
_idps. |
| 13 |
- Create a SAML IdP for your organization. |
| 14 |
- Remove a SAML IdP in your organization. |
| 15 |
- Update a SAML IdP in your organization. |
| 16 |
version_added: '1.0.0' |
| 17 |
extends_documentation_fragment: |
| 18 |
- cisco.meraki.module |
| 19 |
author: Francisco Munoz (@fmunoz) |
| 20 |
options: |
| 21 |
idpId: |
| 22 |
description: IdpId path parameter. Idp ID. |
| 23 |
type: str |
| 24 |
organizationId: |
| 25 |
description: OrganizationId path parameter. Organization ID. |
| 26 |
type: str |
| 27 |
sloLogoutUrl: |
| 28 |
description: Dashboard will redirect users to this URL when they sign out. |
| 29 |
type: str |
| 30 |
ssoLoginUrl: |
| 31 |
description: Dashboard will redirect users to this URL to log in again when their |
| 32 |
sessions expire. |
| 33 |
type: str |
| 34 |
x509certSha1Fingerprint: |
| 35 |
description: Fingerprint (SHA1) of the SAML certificate provided by your Identity |
| 36 |
Provider (IdP). This will be used for encryption / validation. |
| 37 |
type: str |
| 38 |
requirements: |
| 39 |
- meraki >= 2.4.9 |
| 40 |
- python >= 3.5 |
| 41 |
seealso: |
| 42 |
- name: Cisco Meraki documentation for organizations createOrganizationSamlIdp |
| 43 |
description: Complete reference of the createOrganizationSamlIdp API. |
| 44 |
link: https://developer.cisco.com/meraki/api-v1/#!create-organization-saml-idp |
| 45 |
- name: Cisco Meraki documentation for organizations deleteOrganizationSamlIdp |
| 46 |
description: Complete reference of the deleteOrganizationSamlIdp API. |
| 47 |
link: https://developer.cisco.com/meraki/api-v1/#!delete-organization-saml-idp |
| 48 |
- name: Cisco Meraki documentation for organizations updateOrganizationSamlIdp |
| 49 |
description: Complete reference of the updateOrganizationSamlIdp API. |
| 50 |
link: https://developer.cisco.com/meraki/api-v1/#!update-organization-saml-idp |
| 51 |
notes: |
| 52 |
- SDK Method used are |
| 53 |
organizations.Organizations.create_organization_saml_idp, |
| 54 |
organizations.Organizations.delete_organization_saml_idp, |
| 55 |
organizations.Organizations.update_organization_saml_idp, |
| 56 |
- Paths used are |
| 57 |
post /organizations/{organizationId}/saml/idps, |
| 58 |
delete /organizations/{organizationId}/saml/idps/{idpId}, |
| 59 |
put /organizations/{organizationId}/saml/idps/{idpId}, |
| 60 |
""" |
| 61 |
|
| 62 |
EXAMPLES = r""" |
| 63 |
- name: Create |
| 64 |
cisco.meraki.organizations_saml_idps: |
| 65 |
meraki_api_key: "{{ meraki_api_key }}" |
| 66 |
meraki_base_url: "{{ meraki_base_url }}" |
| 67 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 68 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 69 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 70 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 71 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 72 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 73 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 74 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 75 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 76 |
meraki_output_log: "{{ meraki_output_log }}" |
| 77 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 78 |
meraki_log_path: "{{ meraki_log_path }}" |
| 79 |
meraki_print_console: "{{ meraki_print_console }}" |
| 80 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 81 |
meraki_simulate: "{{ meraki_simulate }}" |
| 82 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 83 |
meraki_caller: "{{ meraki_caller }}" |
| 84 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 85 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 86 |
state: present |
| 87 |
organizationId: string |
| 88 |
sloLogoutUrl: https://onelogin.com/trust/saml2/http-redirect/slo/4155000 |
| 89 |
ssoLoginUrl: https://onelogin.com/trust/saml2/http-post/sso/3de5f942-e7b8-4cb9-94e3-85828111158b |
| 90 |
x509certSha1Fingerprint: 00:11:22:33:44:55:66:77:88:99:00:11:22:33:44:55:66:77:88:99 |
| 91 |
- name: Update by id |
| 92 |
cisco.meraki.organizations_saml_idps: |
| 93 |
meraki_api_key: "{{ meraki_api_key }}" |
| 94 |
meraki_base_url: "{{ meraki_base_url }}" |
| 95 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 96 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 97 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 98 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 99 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 100 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 101 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 102 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 103 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 104 |
meraki_output_log: "{{ meraki_output_log }}" |
| 105 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 106 |
meraki_log_path: "{{ meraki_log_path }}" |
| 107 |
meraki_print_console: "{{ meraki_print_console }}" |
| 108 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 109 |
meraki_simulate: "{{ meraki_simulate }}" |
| 110 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 111 |
meraki_caller: "{{ meraki_caller }}" |
| 112 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 113 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 114 |
state: present |
| 115 |
idpId: string |
| 116 |
organizationId: string |
| 117 |
sloLogoutUrl: https://onelogin.com/trust/saml2/http-redirect/slo/4155000 |
| 118 |
ssoLoginUrl: https://onelogin.com/trust/saml2/http-post/sso/3de5f942-e7b8-4cb9-94e3-85828111158b |
| 119 |
x509certSha1Fingerprint: 00:11:22:33:44:55:66:77:88:99:00:11:22:33:44:55:66:77:88:99 |
| 120 |
- name: Delete by id |
| 121 |
cisco.meraki.organizations_saml_idps: |
| 122 |
meraki_api_key: "{{ meraki_api_key }}" |
| 123 |
meraki_base_url: "{{ meraki_base_url }}" |
| 124 |
meraki_single_request_timeout: "{{ meraki_single_request_timeout }}" |
| 125 |
meraki_certificate_path: "{{ meraki_certificate_path }}" |
| 126 |
meraki_requests_proxy: "{{ meraki_requests_proxy }}" |
| 127 |
meraki_wait_on_rate_limit: "{{ meraki_wait_on_rate_limit }}" |
| 128 |
meraki_nginx_429_retry_wait_time: "{{ meraki_nginx_429_retry_wait_time }}" |
| 129 |
meraki_action_batch_retry_wait_time: "{{ meraki_action_batch_retry_wait_time }}" |
| 130 |
meraki_retry_4xx_error: "{{ meraki_retry_4xx_error }}" |
| 131 |
meraki_retry_4xx_error_wait_time: "{{ meraki_retry_4xx_error_wait_time }}" |
| 132 |
meraki_maximum_retries: "{{ meraki_maximum_retries }}" |
| 133 |
meraki_output_log: "{{ meraki_output_log }}" |
| 134 |
meraki_log_file_prefix: "{{ meraki_log_file_prefix }}" |
| 135 |
meraki_log_path: "{{ meraki_log_path }}" |
| 136 |
meraki_print_console: "{{ meraki_print_console }}" |
| 137 |
meraki_suppress_logging: "{{ meraki_suppress_logging }}" |
| 138 |
meraki_simulate: "{{ meraki_simulate }}" |
| 139 |
meraki_be_geo_id: "{{ meraki_be_geo_id }}" |
| 140 |
meraki_caller: "{{ meraki_caller }}" |
| 141 |
meraki_use_iterator_for_get_pages: "{{ meraki_use_iterator_for_get_pages }}" |
| 142 |
meraki_inherit_logging_config: "{{ meraki_inherit_logging_config }}" |
| 143 |
state: absent |
| 144 |
idpId: string |
| 145 |
organizationId: string |
| 146 |
""" |
| 147 |
RETURN = r""" |
| 148 |
meraki_response: |
| 149 |
description: A dictionary or list with the response returned by the Cisco Meraki Python SDK |
| 150 |
returned: always |
| 151 |
type: list |
| 152 |
sample: > |
| 153 |
[ |
| 154 |
{ |
| 155 |
"idpId": "string", |
| 156 |
"consumerUrl": "string", |
| 157 |
"visionConsumerUrl": "string", |
| 158 |
"x509certSha1Fingerprint": "string", |
| 159 |
"ssoLoginUrl": "string", |
| 160 |
"sloLogoutUrl": "string" |
| 161 |
} |
| 162 |
] |
| 163 |
""" |