discovery_service¶
The following methods allow for interaction with the ZTW Discovery Service API endpoints.
Methods are accessible via ztw.discovery_service
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 DiscoveryServiceAPI¶
Bases:
APIClient- get_discovery_settings()¶
Retrieves the workload discovery service settings.
- Returns:
A tuple containing (DiscoveryService instance, Response, error)
- Return type:
Examples
Get the workload discovery service settings:
>>> discovery_settings, _, error = client.ztw.discovery_service.get_discovery_settings() ... if error: ... print(f"Error getting discovery settings: {error}") ... return ... print(f"Discovery settings: {discovery_settings.as_dict()}")
- update_discovery_service_permissions(account_group_id, **kwargs)¶
Verifies the specified AWS account permissions using the discovery role and external ID.
>>> updated_discovery_service_permissions, _, error = ( ... client.ztw.discovery_settings.update_discovery_service_permissions( ... discovery_role="arn:aws:iam::123456789012:role/DiscoveryRole", ... external_id="123456789012" ... ) ... if error: ... print(f"Error updating discovery service permissions: {error}") ... return ... print(f"Discovery service permissions updated: {updated_discovery_service_permissions.as_dict()}")