Skip to content

get_discovery_configuration async

get_discovery_configuration(
    *, config_overrides: Optional[AsyncAPIPortalClientConfig] = None
) -> GetDiscoveryConfigurationResponse

Retrieves the discovery configuration for the account and region.

Raises:

Source code in docs_src/capo_apiportal/_services/async_api_portal.py
async def get_discovery_configuration(
    self, *, config_overrides: Optional[AsyncAPIPortalClientConfig] = None
) -> "capo_apiportal.types.get_discovery_configuration_response.GetDiscoveryConfigurationResponse":
    """Retrieves the discovery configuration for the account and region.

    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_discovery_configuration_request.GetDiscoveryConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_apiportal.types.get_discovery_configuration_response.GetDiscoveryConfigurationResponse"
    ]:
        import capo_apiportal._operations.api_portal_control_service.get_discovery_configuration

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetDiscoveryConfiguration")
    )
    input_: capo_apiportal.types.get_discovery_configuration_request.GetDiscoveryConfigurationRequest = {}

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