config_override_controller

The following methods allow for interaction with the ZPA Config Override Controller API endpoints.

Methods are accessible via zpa.config_override_controller

Copyright (c) 2023, Zscaler Inc.

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

class ConfigOverrideControllerAPI

Bases: APIClient

A Client object for the Config Override Controller resource.

add_config_override(**kwargs)

Adds a new config-override.

Parameters:
  • name (str) – The name of the config-override.

  • description (str) – The description of the config-override.

  • enabled (bool) – Enable the config-override. Defaults to True.

Returns:

ConfigOverrideController: The created config-override object.

Return type:

Tuple

Example

Basic example: Add a new config-override

>>> added_config, _, err = client.zpa.config_override_controller.add_config_override(
... )
get_config_override(config_id)

Returns information on the specified config-override details by ID.

Parameters:

config_id (str) – The unique identifier for the config-override.

Returns:

The config-override object.

Return type:

dict

Examples

>>> fetched_config, _, err = client.zpa.config_override_controller.get_config_override('999999')
... if err:
...     print(f"Error fetching config override by ID: {err}")
...     return
... print(f"Fetched config override by ID: {fetched_config.as_dict()}")
list_config_overrides(query_params=None)

Returns a list of all config-override details.

Keyword Arguments:

{dict} (query_params) –

Map of query parameters for the request.

[query_params.page] {str}: Specifies the page number.

[query_params.page_size] {str}: Specifies the page size.

If not provided, the default page size is 20. The max page size is 500.

[query_params.search] {str}: Search string for filtering results.

Returns:

A list of ConfigOverrideController instances.

Return type:

list

Examples

>>> list_details, _, err = client.zpa.config_override_controller.list_config_overrides(
... query_params={'page': '1', 'page_size': '100'})
... if err:
...     print(f"Error listing config override details: {err}")
...     return
... print(f"Total config override details found: {len(list_details)}")
... for override in list_details:
...     print(override.as_dict())
update_config_override(config_id, **kwargs)

Updates the specified config-override.

Parameters:

config_id (str) – The unique identifier for the config-override being updated.

Returns:

ConfigOverrideController: The updated config-override object.

Return type:

Tuple

Example

Basic example: Update an existing config-override

>>> updated_config, _, err = zpa.config_override_controller.update_config_override(
...     config_id='25546',
... )