Ejemplo n.º 1
0
 /// <inheritdoc />
 public override Task <HmacKeyMetadata> UpdateHmacKeyAsync(HmacKeyMetadata key, UpdateHmacKeyOptions options = null, CancellationToken cancellationToken = default) =>
 CreateUpdateHmacKeyRequest(key, options).ExecuteAsync(cancellationToken);
Ejemplo n.º 2
0
 /// <inheritdoc />
 public override HmacKeyMetadata UpdateHmacKey(HmacKeyMetadata key, UpdateHmacKeyOptions options = null) =>
 CreateUpdateHmacKeyRequest(key, options).Execute();
Ejemplo n.º 3
0
 /// <summary>
 /// Asynchronously updates an HMAC key's metadata.
 /// </summary>
 /// <param name="key">The key to update. Must not be null, and the <see cref="HmacKeyMetadata.ProjectId"/> and <see cref="HmacKeyMetadata.AccessId"/> properties must be set.</param>
 /// <param name="options">Additional options for the operation. May be null, in which case appropriate defaults will be used.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
 /// <returns>A task representing the asynchronous operation, with a result returning the updated key metadata.</returns>
 public virtual Task <HmacKeyMetadata> UpdateHmacKeyAsync(HmacKeyMetadata key, UpdateHmacKeyOptions options = null, CancellationToken cancellationToken = default) =>
 throw new NotImplementedException();
Ejemplo n.º 4
0
        private HmacKeysResource.UpdateRequest CreateUpdateHmacKeyRequest(HmacKeyMetadata key, UpdateHmacKeyOptions options)
        {
            GaxPreconditions.CheckNotNull(key, nameof(key));
            GaxPreconditions.CheckArgument(key.ProjectId != null, nameof(key), "Key must contain a project ID");
            GaxPreconditions.CheckArgument(key.AccessId != null, nameof(key), "Key must contain an access ID");
            var request = Service.Projects.HmacKeys.Update(key, key.ProjectId, key.AccessId);

            request.ModifyRequest += _versionHeaderAction;
            options?.ModifyRequest(request);
            return(request);
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Synchronously updates an HMAC key's metadata.
 /// </summary>
 /// <param name="key">The key to update. Must not be null, and the <see cref="HmacKeyMetadata.ProjectId"/> and <see cref="HmacKeyMetadata.AccessId"/> properties must be set.</param>
 /// <param name="options">Additional options for the operation. May be null, in which case appropriate defaults will be used.</param>
 /// <returns>The updated key metadata.</returns>
 public virtual HmacKeyMetadata UpdateHmacKey(HmacKeyMetadata key, UpdateHmacKeyOptions options = null) =>
 throw new NotImplementedException();