Table of Contents

Class CommandOptions

Namespace
DataStax.AstraDB.DataApi.Core
Assembly
DataStax.AstraDB.DataApi.dll

This class provides a set of low-level options to control the interactions with the underlying data store.

These options can be provided at any level of the SDK hierarchy: DataAPIClient Database Collection

as well as directly to each of the methods. You can provide different options objects at each level, the options specified at the most granular level will take precedence.

public class CommandOptions
Inheritance
CommandOptions
Derived
Inherited Members

Constructors

CommandOptions()

Creates a new instance of CommandOptions with default values.

public CommandOptions()

CommandOptions(CommandOptions)

Creates a new instance of CommandOptions with the same values as a provided instance. Useful for subclasses that may implement a .FromCommandOptions method.

protected CommandOptions(CommandOptions source)

Parameters

source CommandOptions

Properties

APICallers

List of API callers for self-identification in API requests, arranged hierarchically: conventionally, the lowest-level component of the stack is in the last position.

[JsonIgnore]
public List<APICaller> APICallers { get; set; }

Property Value

List<APICaller>

APIVersion

API version to connect to

Defaults to V1

[JsonIgnore]
public APIVersion? APIVersion { get; set; }

Property Value

APIVersion?

CancellationToken

An optional CancellationToken to interrupt asynchronous operations

[JsonIgnore]
public CancellationToken? CancellationToken { get; set; }

Property Value

CancellationToken?

Destination

The destination datastore.

Defaults to ASTRA

[JsonIgnore]
public DataAPIDestination? Destination { get; set; }

Property Value

DataAPIDestination?

HttpClientOptions

Options for the HTTP client

Defaults to HttpVersion: 2.0, FollowRedirects: true

[JsonIgnore]
public HttpClientOptions HttpClientOptions { get; set; }

Property Value

HttpClientOptions

RunMode

The execution mode for database operations.

Defaults to Normal

[JsonIgnore]
public RunMode? RunMode { get; set; }

Property Value

RunMode?

TimeoutOptions

Specify various timeout options to use for the command execution.

[JsonIgnore]
public TimeoutOptions TimeoutOptions { get; set; }

Property Value

TimeoutOptions

Remarks

See TimeoutOptions for information.

Token

The token to use for authentication

[JsonIgnore]
public string Token { get; set; }

Property Value

string

Methods

Defaults()

The default set of options

public static CommandOptions Defaults()

Returns

CommandOptions

Default command options