Skip to main content

Class ACL

Namespace: Consul
Assembly: Consul.dll

[Deprecated] ACL can be used to query the ACL endpoints

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public class ACL : IACLEndpoint

Inheritance

objectACL

Implements

IACLEndpoint

Inherited Members

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

Methods

Clone(string, CancellationToken)

[Deprecated] Clone is used to return a new token cloned from an existing one

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<string>> Clone(string id, CancellationToken ct = default)

Parameters

id string

The ACL ID to clone

ct CancellationToken

The cancellation token

Returns

Task <WriteResult <string >>

A write result containing the newly created ACL token

Clone(string, WriteOptions, CancellationToken)

[Deprecated] Clone is used to return a new token cloned from an existing one

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<string>> Clone(string id, WriteOptions q, CancellationToken ct = default)

Parameters

id string

The ACL ID to clone

q WriteOptions

Customized write options

ct CancellationToken

The cancellation token

Returns

Task <WriteResult <string >>

A write result containing the newly created ACL token

Create(ACLEntry, CancellationToken)

[Deprecated] Create is used to generate a new token with the given parameters

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<string>> Create(ACLEntry acl, CancellationToken ct = default)

Parameters

acl ACLEntry

The ACL entry to create

ct CancellationToken

The cancellation token

Returns

Task <WriteResult <string >>

A write result containing the newly created ACL token

Create(ACLEntry, WriteOptions, CancellationToken)

[Deprecated] Create is used to generate a new token with the given parameters

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<string>> Create(ACLEntry acl, WriteOptions q, CancellationToken ct = default)

Parameters

acl ACLEntry

The ACL entry to create

q WriteOptions

Customized write options

ct CancellationToken

The cancellation token

Returns

Task <WriteResult <string >>

A write result containing the newly created ACL token

Destroy(string, CancellationToken)

[Deprecated] Destroy is used to destroy a given ACL token ID

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<bool>> Destroy(string id, CancellationToken ct = default)

Parameters

id string

The ACL ID to destroy

ct CancellationToken

The cancellation token

Returns

Task <WriteResult <bool >>

An empty write result

Destroy(string, WriteOptions, CancellationToken)

[Deprecated] Destroy is used to destroy a given ACL token ID

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<bool>> Destroy(string id, WriteOptions q, CancellationToken ct = default)

Parameters

id string

The ACL ID to destroy

q WriteOptions

Customized write options

ct CancellationToken

The cancellation token

Returns

Task <WriteResult <bool >>

An empty write result

Info(string, CancellationToken)

[Deprecated] Info is used to query for information about an ACL token

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<QueryResult<ACLEntry>> Info(string id, CancellationToken ct = default)

Parameters

id string

The ACL ID to request information about

ct CancellationToken

The cancellation token

Returns

Task <QueryResult <ACLEntry >>

A query result containing the ACL entry matching the provided ID, or a query result with a null response if no token matched the provided ID

Info(string, QueryOptions, CancellationToken)

[Deprecated] Info is used to query for information about an ACL token

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<QueryResult<ACLEntry>> Info(string id, QueryOptions q, CancellationToken ct = default)

Parameters

id string

The ACL ID to request information about

q 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 <ACLEntry >>

A query result containing the ACL entry matching the provided ID, or a query result with a null response if no token matched the provided ID

List(CancellationToken)

[Deprecated] List is used to get all the ACL tokens

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<QueryResult<ACLEntry[]>> List(CancellationToken ct = default)

Parameters

ct CancellationToken

Returns

Task <QueryResult <ACLEntry []>>

A write result containing the list of all ACLs

List(QueryOptions, CancellationToken)

[Deprecated] List is used to get all the ACL tokens

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<QueryResult<ACLEntry[]>> List(QueryOptions q, CancellationToken ct = default)

Parameters

q 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 <ACLEntry []>>

A write result containing the list of all ACLs

TranslateLegacyTokenRules(string, CancellationToken)

[Deprecated] TranslateLegacyTokenRules will translate legacy rule syntax on a legacy token in to the latest syntax

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<QueryResult<string>> TranslateLegacyTokenRules(string id, CancellationToken ct = default)

Parameters

id string

The legacy token ID whos rule(s) need translated

ct CancellationToken

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

Returns

Task <QueryResult <string >>

A string containing the translated rule(s)

TranslateLegacyTokenRules(string, QueryOptions, CancellationToken)

[Deprecated] TranslateLegacyTokenRules will translate legacy rule syntax on a legacy token in to the latest syntax

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<QueryResult<string>> TranslateLegacyTokenRules(string id, QueryOptions q, CancellationToken ct = default)

Parameters

id string

The legacy token ID whos rule(s) need translated

q 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 <string >>

A string containing the translated rule(s)

TranslateRules(string, CancellationToken)

[Deprecated] TranslateRules will translate legacy rule syntax to latest syntax

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<string>> TranslateRules(string rules, CancellationToken ct = default)

Parameters

rules string

The legacy rule(s) to translate

ct CancellationToken

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

Returns

Task <WriteResult <string >>

A string containing the translated rule(s)

TranslateRules(string, WriteOptions, CancellationToken)

[Deprecated] TranslateRules will translate legacy rule syntax to latest syntax

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult<string>> TranslateRules(string rules, WriteOptions q, CancellationToken ct = default)

Parameters

rules string

The legacy rule(s) to translate

q WriteOptions

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 <WriteResult <string >>

A string containing the translated rule(s)

Update(ACLEntry, CancellationToken)

[Deprecated] Update is used to update the rules of an existing token

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult> Update(ACLEntry acl, CancellationToken ct = default)

Parameters

acl ACLEntry

The ACL entry to update

ct CancellationToken

The cancellation token

Returns

Task <WriteResult >

An empty write result

Update(ACLEntry, WriteOptions, CancellationToken)

[Deprecated] Update is used to update the rules of an existing token

[Obsolete("The Legacy ACL system has been deprecated, please use Token, Role and Policy instead.")]
public Task<WriteResult> Update(ACLEntry acl, WriteOptions q, CancellationToken ct = default)

Parameters

acl ACLEntry

The ACL entry to update

q WriteOptions

Customized write options

ct CancellationToken

The cancellation token

Returns

Task <WriteResult >

An empty write result

  • Methods
    • Clone(string, CancellationToken)
    • Clone(string, WriteOptions, CancellationToken)
    • Create(ACLEntry, CancellationToken)
    • Create(ACLEntry, WriteOptions, CancellationToken)
    • Destroy(string, CancellationToken)
    • Destroy(string, WriteOptions, CancellationToken)
    • Info(string, CancellationToken)
    • Info(string, QueryOptions, CancellationToken)
    • List(CancellationToken)
    • List(QueryOptions, CancellationToken)
    • TranslateLegacyTokenRules(string, CancellationToken)
    • TranslateLegacyTokenRules(string, QueryOptions, CancellationToken)
    • TranslateRules(string, CancellationToken)
    • TranslateRules(string, WriteOptions, CancellationToken)
    • Update(ACLEntry, CancellationToken)
    • Update(ACLEntry, WriteOptions, CancellationToken)