Gateway Config

GatewayConfig resource class for asynchronous operations.

class runloop_api_client.sdk.async_gateway_config.AsyncGatewayConfig(client, gateway_config_id)[source]

Asynchronous wrapper around a gateway config resource.

Gateway configs define how to proxy API requests through the credential gateway. They specify the target endpoint and how credentials should be applied. Use with devboxes to securely proxy requests to external APIs without exposing API keys.

Example

>>> runloop = AsyncRunloopSDK()
>>> gateway_config = await runloop.gateway_config.create(
...     name="my-api-gateway",
...     endpoint="https://api.example.com",
...     auth_mechanism={"type": "bearer"},
... )
>>> info = await gateway_config.get_info()
>>> print(f"Gateway Config: {info.name}")
property id: str

Return the gateway config ID.

Returns:

Unique gateway config ID

Return type:

str

async get_info(**options)[source]

Retrieve the latest gateway config details.

Example

>>> info = await gateway_config.get_info()
>>> print(f"Gateway Config: {info.name}, endpoint: {info.endpoint}")
Parameters:

options (Unpack[BaseRequestOptions]) – Optional request configuration

Returns:

API response describing the gateway config

Return type:

GatewayConfigView

async update(**params)[source]

Update the gateway config.

Example

>>> updated = await gateway_config.update(
...     name="updated-gateway-name",
...     description="Updated description",
... )
Parameters:

params (Unpack[SDKGatewayConfigUpdateParams]) – See SDKGatewayConfigUpdateParams for available parameters

Returns:

Updated gateway config view

Return type:

GatewayConfigView

async delete(**options)[source]

Delete the gateway config. This action is irreversible.

Example

>>> await gateway_config.delete()
Parameters:

options (Unpack[LongRequestOptions]) – Optional long-running request configuration

Returns:

API response acknowledging deletion

Return type:

GatewayConfigView