B `|F@sGdddeZdS)cseZdZfddZeedddZeedddZeeeed d d Zeee d d dZ eeeedddZ eeedddZ eedddZ edddZeee dddZeee ddd Zeed!d"d#Zeed$d%d&Zeed$d'd(ZZS))ActionBatchOrganizationscstt|dS)N)superr__init__)self) __class__y/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-isidps9b/lib/python/meraki/api/batch/organizations.pyrsz!ActionBatchOrganizations.__init__)organizationIdnamec sX|tdddgdd}d|d}dd d gfd d |D}|d |d}|S)a **Create a new configuration template** https://developer.cisco.com/meraki/api-v1/#!create-organization-config-template - organizationId (string): (required) - name (string): The name of the configuration template - timeZone (string): The timezone of the configuration template. For a list of allowed timezones, please see the 'TZ' column in the table in this article. Not applicable if copying from existing network or template - copyFromNetworkId (string): The ID of the network or config template to copy configuration from organizations configureconfigTemplates createOrganizationConfigTemplate)tags operationz/organizations/z/configTemplatesr timeZonecopyFromNetworkIdcs&i|]\}}|kr||qSr)strip).0kv) body_paramsrr szMActionBatchOrganizations.createOrganizationConfigTemplate..create)resourcerbody)updatelocalsitems)rrr kwargsmetadatarpayloadactionr)rrr s   z9ActionBatchOrganizations.createOrganizationConfigTemplate)rconfigTemplateIdc sZ|tdddgdd}d|d|}dd gfd d |D}|d |d }|S)a* **Update a configuration template** https://developer.cisco.com/meraki/api-v1/#!update-organization-config-template - organizationId (string): (required) - configTemplateId (string): (required) - name (string): The name of the configuration template - timeZone (string): The timezone of the configuration template. For a list of allowed timezones, please see the 'TZ' column in the table in this article. r r r updateOrganizationConfigTemplate)rrz/organizations/z/configTemplates/r rcs&i|]\}}|kr||qSr)r)rrr)rrrr<szMActionBatchOrganizations.updateOrganizationConfigTemplate..r)rrr)rrr)rrr"rrrr r!r)rrr#(s z9ActionBatchOrganizations.updateOrganizationConfigTemplate)r licenseId networkId seatCountc sRt}dddgdd}d|d}dd d gfd d |D}|d |d} | S)a **Assign SM seats to a network** https://developer.cisco.com/meraki/api-v1/#!assign-organization-licenses-seats - organizationId (string): (required) - licenseId (string): The ID of the SM license to assign seats from - networkId (string): The ID of the SM network to assign the seats to - seatCount (integer): The number of seats to assign to the SM network. Must be less than or equal to the total number of seats of the license r r licensesassignOrganizationLicensesSeats)rrz/organizations/z/licenses/assignSeatsr$r%r&cs&i|]\}}|kr||qSr)r)rrr)rrrr]szLActionBatchOrganizations.assignOrganizationLicensesSeats..r)rrr)rr) rrr$r%r&rrrr r!r)rrr(Is   z8ActionBatchOrganizations.assignOrganizationLicensesSeats)rdestOrganizationId licenseIdsc sPt}dddgdd}d|d}dd gfd d |D}|d |d }|S)ak **Move licenses to another organization** https://developer.cisco.com/meraki/api-v1/#!move-organization-licenses - organizationId (string): (required) - destOrganizationId (string): The ID of the organization to move the licenses to - licenseIds (array): A list of IDs of licenses to move to the new organization r r r'moveOrganizationLicenses)rrz/organizations/z/licenses/mover)r*cs&i|]\}}|kr||qSr)r)rrr)rrrr}szEActionBatchOrganizations.moveOrganizationLicenses..r)rrr)rr) rrr)r*rrrr r!r)rrr+js  z1ActionBatchOrganizations.moveOrganizationLicenses)rr)r$r&c sRt}dddgdd}d|d}dd d gfd d |D}|d |d} | S)a **Move SM seats to another organization** https://developer.cisco.com/meraki/api-v1/#!move-organization-licenses-seats - organizationId (string): (required) - destOrganizationId (string): The ID of the organization to move the SM seats to - licenseId (string): The ID of the SM license to move the seats from - seatCount (integer): The number of seats to move to the new organization. Must be less than or equal to the total number of seats of the license r r r'moveOrganizationLicensesSeats)rrz/organizations/z/licenses/moveSeatsr)r$r&cs&i|]\}}|kr||qSr)r)rrr)rrrrszJActionBatchOrganizations.moveOrganizationLicensesSeats..r)rrr)rr) rrr)r$r&rrrr r!r)rrr,s   z6ActionBatchOrganizations.moveOrganizationLicensesSeats)rlicenseIdToRenewunusedLicenseIdc sPt}dddgdd}d|d}dd gfd d |D}|d |d }|S)a **Renew SM seats of a license** https://developer.cisco.com/meraki/api-v1/#!renew-organization-licenses-seats - organizationId (string): (required) - licenseIdToRenew (string): The ID of the SM license to renew. This license must already be assigned to an SM network - unusedLicenseId (string): The SM license to use to renew the seats on 'licenseIdToRenew'. This license must have at least as many seats available as there are seats on 'licenseIdToRenew' r r r'renewOrganizationLicensesSeats)rrz/organizations/z/licenses/renewSeatsr-r.cs&i|]\}}|kr||qSr)r)rrr)rrrrszKActionBatchOrganizations.renewOrganizationLicensesSeats..r)rrr)rr) rrr-r.rrrr r!r)rrr/s  z7ActionBatchOrganizations.renewOrganizationLicensesSeats)rr$c sX|tdddgdd}d|d|}dgfd d |D}|d |d }|S) a **Update a license** https://developer.cisco.com/meraki/api-v1/#!update-organization-license - organizationId (string): (required) - licenseId (string): (required) - deviceSerial (string): The serial number of the device to assign this license to. Set this to null to unassign the license. If a different license is already active on the device, this parameter will control queueing/dequeuing this license. r r r'updateOrganizationLicense)rrz/organizations/z /licenses/Z deviceSerialcs&i|]\}}|kr||qSr)r)rrr)rrrrszFActionBatchOrganizations.updateOrganizationLicense..r)rrr)rrr)rrr$rrrr r!r)rrr0s z2ActionBatchOrganizations.updateOrganizationLicense)rc sj|tdddgdd}d|d}dd d d d d ddddddg fdd|D}|d|d}|S)a **Update the login security settings for an organization** https://developer.cisco.com/meraki/api-v1/#!update-organization-login-security - organizationId (string): (required) - enforcePasswordExpiration (boolean): Boolean indicating whether users are forced to change their password every X number of days. - passwordExpirationDays (integer): Number of days after which users will be forced to change their password. - enforceDifferentPasswords (boolean): Boolean indicating whether users, when setting a new password, are forced to choose a new password that is different from any past passwords. - numDifferentPasswords (integer): Number of recent passwords that new password must be distinct from. - enforceStrongPasswords (boolean): Boolean indicating whether users will be forced to choose strong passwords for their accounts. Strong passwords are at least 8 characters that contain 3 of the following: number, uppercase letter, lowercase letter, and symbol - enforceAccountLockout (boolean): Boolean indicating whether users' Dashboard accounts will be locked out after a specified number of consecutive failed login attempts. - accountLockoutAttempts (integer): Number of consecutive failed login attempts after which users' accounts will be locked. - enforceIdleTimeout (boolean): Boolean indicating whether users will be logged out after being idle for the specified number of minutes. - idleTimeoutMinutes (integer): Number of minutes users can remain idle before being logged out of their accounts. - enforceTwoFactorAuth (boolean): Boolean indicating whether users in this organization will be required to use an extra verification code when logging in to Dashboard. This code will be sent to their mobile phone via SMS, or can be generated by the Google Authenticator application. - enforceLoginIpRanges (boolean): Boolean indicating whether organization will restrict access to Dashboard (including the API) from certain IP addresses. - loginIpRanges (array): List of acceptable IP ranges. Entries can be single IP addresses, IP address ranges, and CIDR subnets. r r Z loginSecurityupdateOrganizationLoginSecurity)rrz/organizations/z/loginSecurityZenforcePasswordExpirationZpasswordExpirationDaysZenforceDifferentPasswordsZnumDifferentPasswordsZenforceStrongPasswordsZenforceAccountLockoutZaccountLockoutAttemptsZenforceIdleTimeoutZidleTimeoutMinutesZenforceTwoFactorAuthZenforceLoginIpRangesZ loginIpRangescs&i|]\}}|kr||qSr)r)rrr)rrrrszLActionBatchOrganizations.updateOrganizationLoginSecurity..r)rrr)rrr)rrrrrr r!r)rrr1s  z8ActionBatchOrganizations.updateOrganizationLoginSecurity)rr productTypesc  s^|tdddgdd}d|d}dd d d d d gfdd|D}|d|d}|S)a4 **Create a network** https://developer.cisco.com/meraki/api-v1/#!create-organization-network - organizationId (string): (required) - name (string): The name of the new network - productTypes (array): The product type(s) of the new network. Valid types are wireless, appliance, switch, systemsManager, camera, cellularGateway, environmental. If more than one type is included, the network will be a combined network. - tags (array): A list of tags to be applied to the network - timeZone (string): The timezone of the network. For a list of allowed timezones, please see the 'TZ' column in the table in this article. - copyFromNetworkId (string): The ID of the network to copy configuration from. Other provided parameters will override the copied configuration, except type which must match this network's type exactly. - notes (string): Add any notes or additional information about this network here. r r networkscreateOrganizationNetwork)rrz/organizations/z /networksr r2rrrZnotescs&i|]\}}|kr||qSr)r)rrr)rrrr,szFActionBatchOrganizations.createOrganizationNetwork..r)rrr)rrr) rrr r2rrrr r!r)rrr4s  z2ActionBatchOrganizations.createOrganizationNetwork)rr networkIdsc  sX|tdddgdd}d|d}dd d gfd d |D}|d |d}|S)a| **Combine multiple networks into a single network** https://developer.cisco.com/meraki/api-v1/#!combine-organization-networks - organizationId (string): (required) - name (string): The name of the combined network - networkIds (array): A list of the network IDs that will be combined. If an ID of a combined network is included in this list, the other networks in the list will be grouped into that network - enrollmentString (string): A unique identifier which can be used for device enrollment or easy access through the Meraki SM Registration page or the Self Service Portal. Please note that changing this field may cause existing bookmarks to break. All networks that are part of this combined network will have their enrollment string appended by '-network_type'. If left empty, all exisitng enrollment strings will be deleted. r r r3combineOrganizationNetworks)rrz/organizations/z/networks/combiner r5ZenrollmentStringcs&i|]\}}|kr||qSr)r)rrr)rrrrMszHActionBatchOrganizations.combineOrganizationNetworks..r)rrr)rrr) rrr r5rrrr r!r)rrr69s   z4ActionBatchOrganizations.combineOrganizationNetworks)rx509certSha1Fingerprintc sX|tddddgdd}d|d}d d gfd d |D}|d |d}|S)a **Create a SAML IdP for your organization.** https://developer.cisco.com/meraki/api-v1/#!create-organization-saml-idp - organizationId (string): (required) - x509certSha1Fingerprint (string): Fingerprint (SHA1) of the SAML certificate provided by your Identity Provider (IdP). This will be used for encryption / validation. - sloLogoutUrl (string): Dashboard will redirect users to this URL when they sign out. r r samlidpscreateOrganizationSamlIdp)rrz/organizations/z /saml/idpsr7 sloLogoutUrlcs&i|]\}}|kr||qSr)r)rrr)rrrrmszFActionBatchOrganizations.createOrganizationSamlIdp..r)rrr)rrr)rrr7rrrr r!r)rrr:Zs   z2ActionBatchOrganizations.createOrganizationSamlIdp)ridpIdc s\|tddddgdd}d|d|}d d gfd d |D}|d |d}|S)a **Update a SAML IdP in your organization** https://developer.cisco.com/meraki/api-v1/#!update-organization-saml-idp - organizationId (string): (required) - idpId (string): (required) - x509certSha1Fingerprint (string): Fingerprint (SHA1) of the SAML certificate provided by your Identity Provider (IdP). This will be used for encryption / validation. - sloLogoutUrl (string): Dashboard will redirect users to this URL when they sign out. r r r8r9updateOrganizationSamlIdp)rrz/organizations/z /saml/idps/r7r;cs&i|]\}}|kr||qSr)r)rrr)rrrrszFActionBatchOrganizations.updateOrganizationSamlIdp..r)rrr)rrr)rrr<rrrr r!r)rrr=zs  z2ActionBatchOrganizations.updateOrganizationSamlIdpcCs2ddddgdd}d|d|}|d td }|S) z **Remove a SAML IdP in your organization.** https://developer.cisco.com/meraki/api-v1/#!delete-organization-saml-idp - organizationId (string): (required) - idpId (string): (required) r r r8r9deleteOrganizationSamlIdp)rrz/organizations/z /saml/idps/destroy)rrr)r )rrr<rrr!rrrr>s z2ActionBatchOrganizations.deleteOrganizationSamlIdp)__name__ __module__ __qualname__rstrr r#intr(listr+r,r/r0r1r4r6r:r=r> __classcell__rr)rrrs !!! !  *$! !rN)objectrrrrr