Skip to main content

Class AuthMethod

Namespace: Consul
Assembly: Consul.dll

AuthMethod can be used to query the ACL Auth Method endpoints

public class AuthMethod : IAuthMethodEndpoint

Inheritance

objectAuthMethod

Implements

IAuthMethodEndpoint

Inherited Members

object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()

Methods

Create(AuthMethodEntry, CancellationToken)

Creates a new ACL AuthMethod in Consul

public Task<WriteResult<AuthMethodEntry>> Create(AuthMethodEntry authMethod, CancellationToken ct = default)

Parameters

authMethod AuthMethodEntry

The new ACL AuthMethod

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <AuthMethodEntry >>

A write result containing the created ACL AuthMethod

Create(AuthMethodEntry, WriteOptions, CancellationToken)

Creates a new ACL AuthMethod in Consul

public Task<WriteResult<AuthMethodEntry>> Create(AuthMethodEntry authMethod, WriteOptions writeOptions, CancellationToken ct = default)

Parameters

authMethod AuthMethodEntry

The new ACL AuthMethod

writeOptions WriteOptions

Customized write options

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <AuthMethodEntry >>

A write result containing the created ACL AuthMethod

Delete(string, CancellationToken)

Deletes an existing ACL AuthMethod from Consul

public Task<WriteResult<bool>> Delete(string name, CancellationToken ct = default)

Parameters

name string

The name of the ACL AuthMethod to delete

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <bool >>

Success (true) or failure (false)

Delete(string, WriteOptions, CancellationToken)

Deletes an existing ACL AuthMethod from Consul

public Task<WriteResult<bool>> Delete(string name, WriteOptions writeOptions, CancellationToken ct = default)

Parameters

name string

The name of the ACL AuthMethod to delete

writeOptions WriteOptions

Customized write options

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <bool >>

Success (true) or failure (false)

List(CancellationToken)

Lists the existing ACL AuthMethods in Consul

public Task<QueryResult<AuthMethodEntry[]>> List(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <QueryResult <AuthMethodEntry []>>

A query result containing an array of ACL AuthMethods

List(QueryOptions, CancellationToken)

Lists the existing ACL AuthMethods in Consul

public Task<QueryResult<AuthMethodEntry[]>> List(QueryOptions queryOptions, CancellationToken ct = default)

Parameters

queryOptions QueryOptions

Customized query options

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <QueryResult <AuthMethodEntry []>>

A query result containing an array of ACL AuthMethods

Login(CancellationToken)

Login to ACL Auth Method

public Task<WriteResult<TokenEntry>> Login(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <TokenEntry >>

A write result containing an ACL Token for the login

Login(WriteOptions, CancellationToken)

Login to ACL Auth Method

public Task<WriteResult<TokenEntry>> Login(WriteOptions writeOptions, CancellationToken ct = default)

Parameters

writeOptions WriteOptions

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <TokenEntry >>

A write result containing an ACL Token for the login

Logout(CancellationToken)

Logout from ACL Auth Method

public Task<WriteResult> Logout(CancellationToken ct = default)

Parameters

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult >

A write result

Logout(WriteOptions, CancellationToken)

Logout from ACL Auth Method

public Task<WriteResult> Logout(WriteOptions writeOptions, CancellationToken ct = default)

Parameters

writeOptions WriteOptions

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult >

A write result

Read(string, CancellationToken)

Gets an existing ACL AuthMethod from Consul

public Task<QueryResult<AuthMethodEntry>> Read(string name, CancellationToken ct = default)

Parameters

name string

The Name of the ACL AuthMethod to get

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <QueryResult <AuthMethodEntry >>

A query result containing the requested ACL AuthMethod

Read(string, QueryOptions, CancellationToken)

Gets an existing ACL AuthMethod from Consul

public Task<QueryResult<AuthMethodEntry>> Read(string name, QueryOptions queryOptions, CancellationToken ct = default)

Parameters

name string

The Name of the ACL AuthMethod to get

queryOptions QueryOptions

Customized query options

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <QueryResult <AuthMethodEntry >>

A query result containing the requested ACL AuthMethod

Update(AuthMethodEntry, CancellationToken)

Updates and existing ACL AuthMethod in Consul

public Task<WriteResult<AuthMethodEntry>> Update(AuthMethodEntry authMethod, CancellationToken ct = default)

Parameters

authMethod AuthMethodEntry

The modified ACL AuthMethod

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <AuthMethodEntry >>

A write result containing the updated ACL AuthMethod

Update(AuthMethodEntry, WriteOptions, CancellationToken)

Updates an existing ACL AuthMethod in Consul

public Task<WriteResult<AuthMethodEntry>> Update(AuthMethodEntry authMethod, WriteOptions writeOptions, CancellationToken ct = default)

Parameters

authMethod AuthMethodEntry

The modified ACL AuthMethod

writeOptions WriteOptions

Customized write options

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <AuthMethodEntry >>

A write result containing the updated ACL AuthMethod

  • Methods
    • Create(AuthMethodEntry, CancellationToken)
    • Create(AuthMethodEntry, WriteOptions, CancellationToken)
    • Delete(string, CancellationToken)
    • Delete(string, WriteOptions, CancellationToken)
    • List(CancellationToken)
    • List(QueryOptions, CancellationToken)
    • Login(CancellationToken)
    • Login(WriteOptions, CancellationToken)
    • Logout(CancellationToken)
    • Logout(WriteOptions, CancellationToken)
    • Read(string, CancellationToken)
    • Read(string, QueryOptions, CancellationToken)
    • Update(AuthMethodEntry, CancellationToken)
    • Update(AuthMethodEntry, WriteOptions, CancellationToken)