Show / Hide Table of Contents

Class Secrets

Client used to interact with the Qarnot secrets API.

Inheritance
object
Secrets
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: QarnotSDK
Assembly: QarnotSDK.dll
Syntax
public class Secrets

Methods

CreateSecretAsync<T>(string, T, CancellationToken)

Create a new secret at key with a value of value

Declaration
public Task<string> CreateSecretAsync<T>(string key, T value, CancellationToken ct = default)
Parameters
Type Name Description
string key
T value
CancellationToken ct
Returns
Type Description
Task<string>
Type Parameters
Name Description
T

CreateSecretRawAsync(string, string, CancellationToken)

Create a new secret at key with a value of value

Declaration
public Task<string> CreateSecretRawAsync(string key, string value, CancellationToken ct = default)
Parameters
Type Name Description
string key
string value
CancellationToken ct
Returns
Type Description
Task<string>

DeleteSecretAsync(string, CancellationToken)

Delete the secret at key

Declaration
public Task DeleteSecretAsync(string key, CancellationToken ct = default)
Parameters
Type Name Description
string key
CancellationToken ct
Returns
Type Description
Task

GetSecretAsync<T>(string, CancellationToken)

Retrieve the value of the secret with the key key and deserialize it from JSON to an instance of

Declaration
public Task<T> GetSecretAsync<T>(string key, CancellationToken ct = default)
Parameters
Type Name Description
string key
CancellationToken ct
Returns
Type Description
Task<T>
Type Parameters
Name Description
T

GetSecretRawAsync(string, CancellationToken)

Retrieve the value of the secret with the key key

Declaration
public Task<string> GetSecretRawAsync(string key, CancellationToken ct = default)
Parameters
Type Name Description
string key
CancellationToken ct
Returns
Type Description
Task<string>

ListSecretsAsync(string, bool, CancellationToken)

List all the secrets starting with prefix

Declaration
public Task<IEnumerable<string>> ListSecretsAsync(string prefix = "", bool recursive = false, CancellationToken ct = default)
Parameters
Type Name Description
string prefix
bool recursive

Perform a recursive listing

CancellationToken ct

Optional cancellation token

Returns
Type Description
Task<IEnumerable<string>>
Remarks

When not using recursive mode, only keys and folders directly under prefix are returned. For example, listing with a prefix of "prefix" will return "prefix/a" but won't return "prefix/a/b". Folders can be identified by a trailing "/", for example "prefix/nested/".
When in recursive mode, only the secrets are returned, not the folders.

UpdateSecretAsync<T>(string, T, CancellationToken)

Update the secret at key with a new value of value

Declaration
public Task UpdateSecretAsync<T>(string key, T value, CancellationToken ct = default)
Parameters
Type Name Description
string key
T value
CancellationToken ct
Returns
Type Description
Task
Type Parameters
Name Description
T

UpdateSecretRawAsync(string, string, CancellationToken)

Update the secret at key with a new value of value

Declaration
public Task UpdateSecretRawAsync(string key, string value, CancellationToken ct = default)
Parameters
Type Name Description
string key
string value
CancellationToken ct
Returns
Type Description
Task
In this article
Back to top Generated by DocFX