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
Implements
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
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
Customized write options
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
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
Customized write options
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
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
Customized write options
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
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
Customized query options
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
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
Customized query options
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
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
Customized query options
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
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
Customized query options
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
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
Customized write options
The cancellation token
Returns
Task <WriteResult >
An empty write result