public virtual async Task <Response <Key> > UpdateKeyAsync(KeyBase key, IEnumerable <KeyOperations> keyOperations, CancellationToken cancellationToken = default) { if (string.IsNullOrEmpty(key?.Version)) { throw new ArgumentException($"{nameof(key.Version)} can't be empty or null"); } var parameters = new KeyRequestParameters(key, keyOperations); return(await SendRequestAsync(HttpPipelineMethod.Patch, parameters, () => new Key(key.Name), cancellationToken, KeysPath, key.Name, "/", key.Version)); }
public virtual Response <Key> UpdateKey(KeyBase key, IEnumerable <KeyOperations> keyOperations, CancellationToken cancellationToken = default) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (key.Version == null) { throw new ArgumentNullException($"{nameof(key)}.{nameof(key.Version)}"); } if (keyOperations == null) { throw new ArgumentNullException(nameof(keyOperations)); } var parameters = new KeyRequestParameters(key, keyOperations); return(SendRequest(HttpPipelineMethod.Patch, parameters, () => new Key(key.Name), cancellationToken, KeysPath, key.Name, "/", key.Version)); }
/// <summary> /// The update key operation changes specified attributes of a stored key and /// can be applied to any key type and key version stored in Azure Key Vault. /// </summary> /// <remarks> /// In order to perform this operation, the key must already exist in the Key /// Vault. Note: The cryptographic material of a key itself cannot be changed. /// This operation requires the keys/update permission. /// </remarks> /// <param name="key">The <see cref="KeyBase"/> object with updated properties.</param> /// <param name="keyOperations">List of supported <see cref="KeyOperations"/>.</param> /// <param name="cancellationToken">A <see cref="CancellationToken"/> controlling the request lifetime.</param> public virtual async Task <Response <Key> > UpdateKeyAsync(KeyBase key, IEnumerable <KeyOperations> keyOperations, CancellationToken cancellationToken = default) { if (key == null) { throw new ArgumentNullException(nameof(key)); } if (key.Version == null) { throw new ArgumentNullException($"{nameof(key)}.{nameof(key.Version)}"); } if (keyOperations == null) { throw new ArgumentNullException(nameof(keyOperations)); } var parameters = new KeyRequestParameters(key, keyOperations); return(await SendRequestAsync(RequestMethod.Patch, parameters, () => new Key(key.Name), cancellationToken, KeysPath, key.Name, "/", key.Version).ConfigureAwait(false)); }
public virtual async Task <Response <Key> > UpdateKeyAsync(KeyBase key, IEnumerable <KeyOperations> keyOperations = null, CancellationToken cancellationToken = default) { await Task.CompletedTask; throw new NotImplementedException(); }
public virtual Response <Key> UpdateKey(KeyBase key, IEnumerable <KeyOperations> keyOperations = null, CancellationToken cancellationToken = default) { throw new NotImplementedException(); }
public virtual Response <Key> UpdateKey(KeyBase key, IList <string> keyOps = null, CancellationToken cancellationToken = default) { throw new NotImplementedException(); }