/// <summary> /// Update is used to update the rules of an existing token /// </summary> /// <param name="acl">The ACL entry to update</param> /// <param name="q">Customized write options</param> /// <returns>An empty write result</returns> public Task <WriteResult> Update(ACLEntry acl, WriteOptions q, CancellationToken ct = default(CancellationToken)) { return(_client.Put("/v1/acl/update", acl, q).Execute(ct)); }
/// <summary> /// Create is used to generate a new token with the given parameters /// </summary> /// <param name="acl">The ACL entry to create</param> /// <param name="q">Customized write options</param> /// <returns>A write result containing the newly created ACL token</returns> public async Task <WriteResult <string> > Create(ACLEntry acl, WriteOptions q, CancellationToken ct = default(CancellationToken)) { var res = await _client.Put <ACLEntry, ACLCreationResult>("/v1/acl/create", acl, q).Execute(ct).ConfigureAwait(false); return(new WriteResult <string>(res, res.Response.ID)); }
/// <summary> /// Update is used to update the rules of an existing token /// </summary> /// <param name="acl">The ACL entry to update</param> /// <returns>An empty write result</returns> public Task <WriteResult> Update(ACLEntry acl, CancellationToken ct = default(CancellationToken)) { return(Update(acl, WriteOptions.Default, ct)); }
/// <summary> /// Create is used to generate a new token with the given parameters /// </summary> /// <param name="acl">The ACL entry to create</param> /// <returns>A write result containing the newly created ACL token</returns> public Task <WriteResult <string> > Create(ACLEntry acl, CancellationToken ct = default(CancellationToken)) { return(Create(acl, WriteOptions.Default, ct)); }