Share via


ConfidentialLedgerClient.GetRuntimeOptions(RequestContext) Method

Definition

[Protocol Method] Runtime options for user defined endpoints.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response GetRuntimeOptions(Azure.RequestContext context = default);
abstract member GetRuntimeOptions : Azure.RequestContext -> Azure.Response
override this.GetRuntimeOptions : Azure.RequestContext -> Azure.Response
Public Overridable Function GetRuntimeOptions (Optional context As RequestContext = Nothing) As Response

Parameters

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

Service returned a non-success status code.

Examples

This sample shows how to call GetRuntimeOptions and parse the result.

TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential);

Response response = client.GetRuntimeOptions();

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call GetRuntimeOptions with all request content and parse the result.

TokenCredential credential = new DefaultAzureCredential();
ConfidentialLedgerClient client = new ConfidentialLedgerClient(new Uri("http://localhost:3000"), credential);

Response response = client.GetRuntimeOptions();

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("log_exception_details").ToString());
Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString());
Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString());
Console.WriteLine(result.GetProperty("max_heap_bytes").ToString());
Console.WriteLine(result.GetProperty("max_stack_bytes").ToString());
Console.WriteLine(result.GetProperty("return_exception_details").ToString());

Applies to