internal UpdateTableResponse UpdateTable(UpdateTableRequest request) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; return(Invoke <UpdateTableRequest, UpdateTableResponse>(request, marshaller, unmarshaller)); }
public void UpdateTableMarshallTest() { var request = InstantiateClassGenerator.Execute <UpdateTableRequest>(); var marshaller = new UpdateTableRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <UpdateTableRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("UpdateTable").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateTableResponseUnmarshaller.Instance.Unmarshall(context) as UpdateTableResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// <para>Updates the provisioned throughput for the given table. Setting the throughput for a table helps you manage performance and is part of /// the provisioned throughput feature of DynamoDB.</para> <para>The provisioned throughput values can be upgraded or downgraded based on the /// maximums and minimums listed in the <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> /// section in the Amazon DynamoDB Developer Guide.</para> <para>The table must be in the <c>ACTIVE</c> state for this operation to succeed. /// <i>UpdateTable</i> is an asynchronous operation; while executing the operation, the table is in the <c>UPDATING</c> state. While the table /// is in the <c>UPDATING</c> state, the table still has the provisioned throughput from before the call. The new provisioned throughput setting /// is in effect only when the table returns to the <c>ACTIVE</c> state after the <i>UpdateTable</i> operation. </para> <para>You cannot add, /// modify or delete indexes using <i>UpdateTable</i> . Indexes can only be defined at table creation time.</para> /// </summary> /// /// <param name="updateTableRequest">Container for the necessary parameters to execute the UpdateTable service method on /// AmazonDynamoDBv2.</param> /// /// <returns>The response from the UpdateTable service method, as returned by AmazonDynamoDBv2.</returns> /// /// <exception cref="T:Amazon.DynamoDBv2.Model.ResourceInUseException" /> /// <exception cref="T:Amazon.DynamoDBv2.Model.ResourceNotFoundException" /> /// <exception cref="T:Amazon.DynamoDBv2.Model.LimitExceededException" /> /// <exception cref="T:Amazon.DynamoDBv2.Model.InternalServerErrorException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task <UpdateTableResponse> UpdateTableAsync(UpdateTableRequest updateTableRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, UpdateTableRequest, UpdateTableResponse>(updateTableRequest, marshaller, unmarshaller, signer, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTable operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTable operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <UpdateTableResponse> UpdateTableAsync(UpdateTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; return(InvokeAsync <UpdateTableRequest, UpdateTableResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTable operation. /// <seealso cref="Amazon.DynamoDBv2.IAmazonDynamoDB"/> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTable operation.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// <returns>void</returns> public void UpdateTableAsync(UpdateTableRequest request, AmazonServiceCallback callback, object state) { if (!AmazonInitializer.IsInitialized) { throw new Exception("AWSPrefab is not added to the scene"); } ThreadPool.QueueUserWorkItem(new WaitCallback(delegate { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; Invoke(request, callback, state, marshaller, unmarshaller, signer); })); return; }
/// <summary> /// Initiates the asynchronous execution of the UpdateTable operation. /// <seealso cref="Amazon.DynamoDBv2.IAmazonDynamoDB"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTable operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task<UpdateTableResponse> UpdateTableAsync(UpdateTableRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; return InvokeAsync<UpdateTableRequest,UpdateTableResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal UpdateTableResponse UpdateTable(UpdateTableRequest request) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; return Invoke<UpdateTableRequest,UpdateTableResponse>(request, marshaller, unmarshaller); }
public void UpdateTableMarshallTest() { var request = InstantiateClassGenerator.Execute<UpdateTableRequest>(); var marshaller = new UpdateTableRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<UpdateTableRequest>(request,jsonRequest); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("UpdateTable").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateTableResponseUnmarshaller.Instance.Unmarshall(context) as UpdateTableResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
IAsyncResult invokeUpdateTable(UpdateTableRequest updateTableRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateTableRequestMarshaller().Marshall(updateTableRequest); var unmarshaller = UpdateTableResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
/// <summary> /// <para>Updates the provisioned throughput for the given table. Setting the throughput for a table helps you manage performance and is part of /// the provisioned throughput feature of DynamoDB.</para> <para>The provisioned throughput values can be upgraded or downgraded based on the /// maximums and minimums listed in the <a href="http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Limits.html">Limits</a> /// section in the Amazon DynamoDB Developer Guide.</para> <para>The table must be in the <c>ACTIVE</c> state for this operation to succeed. /// <i>UpdateTable</i> is an asynchronous operation; while executing the operation, the table is in the <c>UPDATING</c> state. While the table /// is in the <c>UPDATING</c> state, the table still has the provisioned throughput from before the call. The new provisioned throughput setting /// is in effect only when the table returns to the <c>ACTIVE</c> state after the <i>UpdateTable</i> operation. </para> <para>You cannot add, /// modify or delete indexes using <i>UpdateTable</i> . Indexes can only be defined at table creation time.</para> /// </summary> /// /// <param name="updateTableRequest">Container for the necessary parameters to execute the UpdateTable service method on /// AmazonDynamoDBv2.</param> /// /// <returns>The response from the UpdateTable service method, as returned by AmazonDynamoDBv2.</returns> /// /// <exception cref="T:Amazon.DynamoDBv2.Model.ResourceInUseException" /> /// <exception cref="T:Amazon.DynamoDBv2.Model.ResourceNotFoundException" /> /// <exception cref="T:Amazon.DynamoDBv2.Model.LimitExceededException" /> /// <exception cref="T:Amazon.DynamoDBv2.Model.InternalServerErrorException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<UpdateTableResponse> UpdateTableAsync(UpdateTableRequest updateTableRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateTableRequest, UpdateTableResponse>(updateTableRequest, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTable operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTable operation on AmazonDynamoDBClient.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndUpdateTable /// operation.</returns> public IAsyncResult BeginUpdateTable(UpdateTableRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; return BeginInvoke<UpdateTableRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para> Updates the provisioned throughput for the given table. Setting the throughput for a table helps you manage performance and is part /// of the Provisioned Capacity feature of Amazon DynamoDB. </para> /// </summary> /// /// <param name="updateTableRequest">Container for the necessary parameters to execute the UpdateTable service method on AmazonDynamoDB.</param> /// /// <returns>The response from the UpdateTable service method, as returned by AmazonDynamoDB.</returns> /// /// <exception cref="ResourceInUseException"/> /// <exception cref="LimitExceededException"/> /// <exception cref="InternalServerErrorException"/> /// <exception cref="ResourceNotFoundException"/> public UpdateTableResponse UpdateTable(UpdateTableRequest updateTableRequest) { IRequest<UpdateTableRequest> request = new UpdateTableRequestMarshaller().Marshall(updateTableRequest); UpdateTableResponse response = Invoke<UpdateTableRequest, UpdateTableResponse> (request, this.signer, UpdateTableResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the UpdateTable operation. /// <seealso cref="Amazon.DynamoDBv2.IAmazonDynamoDB.UpdateTable"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTable operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public async Task<UpdateTableResponse> UpdateTableAsync(UpdateTableRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateTableRequest, UpdateTableResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// Initiates the asynchronous execution of the UpdateTable operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTable operation on AmazonDynamoDBClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> public void UpdateTableAsync(UpdateTableRequest request, AmazonServiceCallback<UpdateTableRequest, UpdateTableResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new UpdateTableRequestMarshaller(); var unmarshaller = UpdateTableResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<UpdateTableRequest,UpdateTableResponse> responseObject = new AmazonServiceResult<UpdateTableRequest,UpdateTableResponse>((UpdateTableRequest)req, (UpdateTableResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<UpdateTableRequest>(request, marshaller, unmarshaller, options, callbackHelper); }