def update_network_bluetooth_settings(self, options=dict()): """Does a PUT request to /networks/{networkId}/bluetoothSettings. Update the Bluetooth settings for a network. See the docs page for <a href="https://documentation.meraki.com/MR/Bluetooth/Bluetooth_Low_Energ y_(BLE)">Bluetooth settings</a>. Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: network_id -- string -- TODO: type description here. Example: update_network_bluetooth_settings -- UpdateNetworkBluetoothSettingsModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(network_id=options.get("network_id")) # Prepare query URL _url_path = '/networks/{networkId}/bluetoothSettings' _url_path = APIHelper.append_url_with_template_parameters( _url_path, {'networkId': options.get('network_id', None)}) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.put( _query_url, headers=_headers, parameters=APIHelper.json_serialize( options.get('update_network_bluetooth_settings'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def provision_network_clients(self, options=dict()): """Does a POST request to /networks/{networkId}/clients/provision. Provisions a client with a name and policy. Clients can be provisioned before they associate to the network. Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: network_id -- string -- TODO: type description here. Example: provision_network_clients -- ProvisionNetworkClientsModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters( network_id=options.get("network_id"), provision_network_clients=options.get("provision_network_clients")) # Prepare query URL _url_path = '/networks/{networkId}/clients/provision' _url_path = APIHelper.append_url_with_template_parameters( _url_path, {'networkId': options.get('network_id', None)}) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.post( _query_url, headers=_headers, parameters=APIHelper.json_serialize( options.get('provision_network_clients'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def update_organization_saml_role(self, options=dict()): """Does a PUT request to /organizations/{organizationId}/samlRoles/{samlRoleId}. Update a SAML role Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: organization_id -- string -- TODO: type description here. Example: saml_role_id -- string -- TODO: type description here. Example: update_organization_saml_role -- UpdateOrganizationSamlRoleModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(organization_id=options.get("organization_id"), saml_role_id=options.get("saml_role_id")) # Prepare query URL _url_path = '/organizations/{organizationId}/samlRoles/{samlRoleId}' _url_path = APIHelper.append_url_with_template_parameters(_url_path, { 'organizationId': options.get('organization_id', None), 'samlRoleId': options.get('saml_role_id', None) }) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.put(_query_url, headers=_headers, parameters=APIHelper.json_serialize(options.get('update_organization_saml_role'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def update_device_camera_quality_and_retention_settings( self, options=dict()): """Does a PUT request to /devices/{serial}/camera/qualityAndRetentionSettings. Update quality and retention settings for the given camera Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: serial -- string -- TODO: type description here. Example: update_device_camera_quality_and_retention_settings -- UpdateDeviceCameraQualityAndRetentionSettingsModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(serial=options.get("serial")) # Prepare query URL _url_path = '/devices/{serial}/camera/qualityAndRetentionSettings' _url_path = APIHelper.append_url_with_template_parameters( _url_path, {'serial': options.get('serial', None)}) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.put( _query_url, headers=_headers, parameters=APIHelper.json_serialize( options.get( 'update_device_camera_quality_and_retention_settings'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def update_network_ssid_l_3_firewall_rules(self, options=dict()): """Does a PUT request to /networks/{networkId}/ssids/{number}/l3FirewallRules. Update the L3 firewall rules of an SSID on an MR network Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: network_id -- string -- TODO: type description here. Example: number -- string -- TODO: type description here. Example: update_network_ssid_l_3_firewall_rules -- UpdateNetworkSsidL3FirewallRulesModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(network_id=options.get("network_id"), number=options.get("number")) # Prepare query URL _url_path = '/networks/{networkId}/ssids/{number}/l3FirewallRules' _url_path = APIHelper.append_url_with_template_parameters(_url_path, { 'networkId': options.get('network_id', None), 'number': options.get('number', None) }) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.put(_query_url, headers=_headers, parameters=APIHelper.json_serialize(options.get('update_network_ssid_l_3_firewall_rules'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def claim_organization(self, options=dict()): """Does a POST request to /organizations/{organizationId}/claim. Claim a list of devices, licenses, and/or orders into an organization. When claiming by order, all devices and licenses in the order will be claimed; licenses will be added to the organization and devices will be placed in the organization's inventory. Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: organization_id -- string -- TODO: type description here. Example: claim_organization -- ClaimOrganizationModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(organization_id=options.get("organization_id")) # Prepare query URL _url_path = '/organizations/{organizationId}/claim' _url_path = APIHelper.append_url_with_template_parameters(_url_path, { 'organizationId': options.get('organization_id', None) }) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.post(_query_url, headers=_headers, parameters=APIHelper.json_serialize(options.get('claim_organization'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def create_organization(self, create_organization): """Does a POST request to /organizations. Create a new organization Args: create_organization (CreateOrganizationModel): TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(create_organization=create_organization) # Prepare query URL _url_path = '/organizations' _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.post( _query_url, headers=_headers, parameters=APIHelper.json_serialize(create_organization)) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def update_network_client_splash_authorization_status(self, options=dict()): """Does a PUT request to /networks/{networkId}/clients/{clientId}/splashAuthorizationStatus. Update a client's splash authorization. Clients can be identified by a client key or either the MAC or IP depending on whether the network uses Track-by-IP. Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: network_id -- string -- TODO: type description here. Example: client_id -- string -- TODO: type description here. Example: update_network_client_splash_authorization_status -- UpdateNetworkClientSplashAuthorizationStatusModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters(network_id=options.get("network_id"), client_id=options.get("client_id")) # Prepare query URL _url_path = '/networks/{networkId}/clients/{clientId}/splashAuthorizationStatus' _url_path = APIHelper.append_url_with_template_parameters(_url_path, { 'networkId': options.get('network_id', None), 'clientId': options.get('client_id', None) }) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.put(_query_url, headers=_headers, parameters=APIHelper.json_serialize(options.get('update_network_client_splash_authorization_status'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)
def renew_organization_licenses_seats(self, options=dict()): """Does a POST request to /organizations/{organizationId}/licenses/renewSeats. Renew SM seats of a license. This will extend the license expiration date of managed SM devices covered by this license Args: options (dict, optional): Key-value pairs for any of the parameters to this API Endpoint. All parameters to the endpoint are supplied through the dictionary with their names being the key and their desired values being the value. A list of parameters that can be used are:: organization_id -- string -- TODO: type description here. Example: renew_organization_licenses_seats -- RenewOrganizationLicensesSeatsModel -- TODO: type description here. Example: Returns: mixed: Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate_parameters( organization_id=options.get("organization_id"), renew_organization_licenses_seats=options.get( "renew_organization_licenses_seats")) # Prepare query URL _url_path = '/organizations/{organizationId}/licenses/renewSeats' _url_path = APIHelper.append_url_with_template_parameters( _url_path, {'organizationId': options.get('organization_id', None)}) _query_builder = Configuration.base_uri _query_builder += _url_path _query_url = APIHelper.clean_url(_query_builder) # Prepare headers _headers = { 'accept': 'application/json', 'content-type': 'application/json; charset=utf-8' } # Prepare and execute request _request = self.http_client.post( _query_url, headers=_headers, parameters=APIHelper.json_serialize( options.get('renew_organization_licenses_seats'))) CustomHeaderAuth.apply(_request) _context = self.execute_request(_request) self.validate_response(_context) # Return appropriate type return APIHelper.json_deserialize(_context.response.raw_body)