/// <summary> /// Updates properties on a ledger. /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateLedger service method.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// /// <returns>The response from the UpdateLedger service method, as returned by QLDB.</returns> /// <exception cref="Amazon.QLDB.Model.InvalidParameterException"> /// One or more parameters in the request aren't valid. /// </exception> /// <exception cref="Amazon.QLDB.Model.ResourceNotFoundException"> /// The specified resource doesn't exist. /// </exception> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/qldb-2019-01-02/UpdateLedger">REST API Reference for UpdateLedger Operation</seealso> public virtual Task <UpdateLedgerResponse> UpdateLedgerAsync(UpdateLedgerRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateLedgerRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateLedgerResponseUnmarshaller.Instance; return(InvokeAsync <UpdateLedgerResponse>(request, options, cancellationToken)); }
internal virtual UpdateLedgerResponse UpdateLedger(UpdateLedgerRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateLedgerRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateLedgerResponseUnmarshaller.Instance; return(Invoke <UpdateLedgerResponse>(request, options)); }
private void UpdateLedgerDeletionProtection(string ledgerName, bool deletionProtection) { var ledgerRequest = new UpdateLedgerRequest { Name = ledgerName, DeletionProtection = deletionProtection }; this.amazonQldbClient.UpdateLedgerAsync(ledgerRequest) .GetAwaiter() .GetResult(); }