Skip to content

get_organization_discovery_configuration async

get_organization_discovery_configuration(
    *, config_overrides: Optional[AsyncAPIPortalClientConfig] = None
) -> GetOrganizationDiscoveryConfigurationResponse

Retrieves the organization-wide discovery configuration. Only the organization management account and registered delegated administrators may call this operation.

Raises:

Source code in docs_src/capo_apiportal/_services/async_api_portal.py
async def get_organization_discovery_configuration(
    self, *, config_overrides: Optional[AsyncAPIPortalClientConfig] = None
) -> "capo_apiportal.types.get_organization_discovery_configuration_response.GetOrganizationDiscoveryConfigurationResponse":
    """Retrieves the organization-wide discovery configuration. Only the organization management account and registered delegated administrators may call this operation.

    Raises:
        capo_apiportal.errors.access_denied_exception.AccessDeniedException: You do not have permission to perform this operation.
        capo_apiportal.errors.internal_server_exception.InternalServerException: The service encountered an internal error. Try the request again.
        capo_apiportal.errors.resource_not_found_exception.ResourceNotFoundException: The requested resource does not exist, or you do not have access to it.
        capo_apiportal.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_apiportal.types.get_organization_discovery_configuration_request.GetOrganizationDiscoveryConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_apiportal.types.get_organization_discovery_configuration_response.GetOrganizationDiscoveryConfigurationResponse"
    ]:
        import capo_apiportal._operations.api_portal_control_service.get_organization_discovery_configuration

        (
            output,
            http_response,
        ) = await capo_apiportal._operations.api_portal_control_service.get_organization_discovery_configuration.async_get_organization_discovery_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetOrganizationDiscoveryConfiguration")
    )
    input_: capo_apiportal.types.get_organization_discovery_configuration_request.GetOrganizationDiscoveryConfigurationRequest = {}

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output