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}")
- 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:
- 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]) – SeeSDKGatewayConfigUpdateParamsfor available parameters- Returns:
Updated gateway config view
- Return type:
- 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:
GatewayConfig resource class for synchronous operations.
- class runloop_api_client.sdk.gateway_config.GatewayConfig(client, gateway_config_id)[source]¶
Synchronous 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 = RunloopSDK() >>> gateway_config = runloop.gateway_config.create( ... name="my-api-gateway", ... endpoint="https://api.example.com", ... auth_mechanism={"type": "bearer"}, ... ) >>> info = gateway_config.get_info() >>> print(f"Gateway Config: {info.name}")
- get_info(**options)[source]¶
Retrieve the latest gateway config details.
Example
>>> info = 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:
- update(**params)[source]¶
Update the gateway config.
Example
>>> updated = gateway_config.update( ... name="updated-gateway-name", ... description="Updated description", ... )
- Parameters:
params (
Unpack[SDKGatewayConfigUpdateParams]) – SeeSDKGatewayConfigUpdateParamsfor available parameters- Returns:
Updated gateway config view
- Return type:
- delete(**options)[source]¶
Delete the gateway config. This action is irreversible.
Example
>>> gateway_config.delete()
- Parameters:
options (
Unpack[LongRequestOptions]) – Optional long-running request configuration- Returns:
API response acknowledging deletion
- Return type: