Class BindingRule
Namespace: Consul
Assembly: Consul.dll
BindingRule is used to interact with ACL Binding Rules in Consul through the API
public class BindingRule : IBindingRuleEndpoint
Inheritance
Implements
Inherited Members
object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()
Methods
Create(ACLBindingRule, CancellationToken)
Creates a new ACL BindingRule in Consul
public Task<WriteResult<ACLBindingRuleResponse>> Create(ACLBindingRule entry, CancellationToken ct)
Parameters
entry ACLBindingRule
The new ACL AuthMethod
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <WriteResult <ACLBindingRuleResponse >>
A write result containing the created ACL AuthMethod
Create(ACLBindingRule)
public Task<WriteResult<ACLBindingRuleResponse>> Create(ACLBindingRule entry)
Parameters
entry ACLBindingRule
Returns
Task <WriteResult <ACLBindingRuleResponse >>
Create(ACLBindingRule, WriteOptions, CancellationToken)
Creates a new ACL BindingRule in Consul
public Task<WriteResult<ACLBindingRuleResponse>> Create(ACLBindingRule entry, WriteOptions options, CancellationToken ct = default)
Parameters
entry ACLBindingRule
A new Binding Rule Entry
options WriteOptions
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <WriteResult <ACLBindingRuleResponse >>
A new Binding Rule
Delete(string, CancellationToken)
Deletes an ACL binding rule.
public Task<WriteResult> Delete(string id, CancellationToken ct)
Parameters
id string
Specifies the UUID of the binding rule you delete
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <WriteResult >
Delete(string)
public Task<WriteResult> Delete(string id)
Parameters
id string
Returns
Task <WriteResult >
Delete(string, WriteOptions, CancellationToken)
Deletes an ACL binding rule.
public Task<WriteResult> Delete(string id, WriteOptions options, CancellationToken ct = default)
Parameters
id string
Specifies the UUID of the binding rule you delete
options WriteOptions
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <WriteResult >
List(CancellationToken)
Retrieves a listing of all binding rules
public Task<QueryResult<ACLBindingRuleResponse[]>> List(CancellationToken ct)
Parameters
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <QueryResult <ACLBindingRuleResponse []>>
A lists of all the ACL binding rules
List()
public Task<QueryResult<ACLBindingRuleResponse[]>> List()
Returns
Task <QueryResult <ACLBindingRuleResponse []>>
List(QueryOptions, CancellationToken)
Retrieves a listing of all binding rules
public Task<QueryResult<ACLBindingRuleResponse[]>> List(QueryOptions options, CancellationToken ct = default)
Parameters
options QueryOptions
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <QueryResult <ACLBindingRuleResponse []>>
A lists of all the ACL binding rules
Read(string, CancellationToken)
Reads a binding rule in Consul
public Task<QueryResult<ACLBindingRuleResponse>> Read(string id, CancellationToken ct)
Parameters
id string
UUID of the binding rule to read
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <QueryResult <ACLBindingRuleResponse >>
An existing Binding rule with the specified id
Read(string)
public Task<QueryResult<ACLBindingRuleResponse>> Read(string id)
Parameters
id string
Returns
Task <QueryResult <ACLBindingRuleResponse >>
Read(string, QueryOptions, CancellationToken)
Reads an ACL binding rule in Consul
public Task<QueryResult<ACLBindingRuleResponse>> Read(string id, QueryOptions options, CancellationToken ct = default)
Parameters
id string
UUID of the ACL binding rule to read
options QueryOptions
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <QueryResult <ACLBindingRuleResponse >>
An existing Binding rule with the specified id
Update(ACLBindingRule, CancellationToken)
Updates an existing ACL binding rule
public Task<WriteResult<ACLBindingRuleResponse>> Update(ACLBindingRule entry, CancellationToken ct)
Parameters
entry ACLBindingRule
Specifies the ACL binding rule you update
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <WriteResult <ACLBindingRuleResponse >>
Returns the updated Binding Rule
Update(ACLBindingRule)
public Task<WriteResult<ACLBindingRuleResponse>> Update(ACLBindingRule entry)
Parameters
entry ACLBindingRule
Returns
Task <WriteResult <ACLBindingRuleResponse >>
Update(ACLBindingRule, WriteOptions, CancellationToken)
Updates an existing ACL binding rule
public Task<WriteResult<ACLBindingRuleResponse>> Update(ACLBindingRule entry, WriteOptions options, CancellationToken ct = default)
Parameters
entry ACLBindingRule
Specifies the ACL binding rule you update
options WriteOptions
Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing
Returns
Task <WriteResult <ACLBindingRuleResponse >>
Returns the updated Binding Rule