Exemplo n.º 1
0
        /// <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));
        }
Exemplo n.º 2
0
        internal virtual UpdateLedgerResponse UpdateLedger(UpdateLedgerRequest request)
        {
            var options = new InvokeOptions();

            options.RequestMarshaller    = UpdateLedgerRequestMarshaller.Instance;
            options.ResponseUnmarshaller = UpdateLedgerResponseUnmarshaller.Instance;

            return(Invoke <UpdateLedgerResponse>(request, options));
        }
Exemplo n.º 3
0
        private void UpdateLedgerDeletionProtection(string ledgerName, bool deletionProtection)
        {
            var ledgerRequest = new UpdateLedgerRequest
            {
                Name = ledgerName,
                DeletionProtection = deletionProtection
            };

            this.amazonQldbClient.UpdateLedgerAsync(ledgerRequest)
            .GetAwaiter()
            .GetResult();
        }