public void UpdateDestinationMarshallTest() { var request = InstantiateClassGenerator.Execute <UpdateDestinationRequest>(); var marshaller = new UpdateDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <UpdateDestinationRequest>(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("UpdateDestination").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateDestinationResponseUnmarshaller.Instance.Unmarshall(context) as UpdateDestinationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal virtual UpdateDestinationResponse UpdateDestination(UpdateDestinationRequest request) { var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; return(Invoke <UpdateDestinationRequest, UpdateDestinationResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateDestination operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateDestination 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> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UpdateDestination">REST API Reference for UpdateDestination Operation</seealso> public virtual Task <UpdateDestinationResponse> UpdateDestinationAsync(UpdateDestinationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; return(InvokeAsync <UpdateDestinationRequest, UpdateDestinationResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateDestination operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateDestination operation on AmazonKinesisFirehoseClient.</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 EndUpdateDestination /// operation.</returns> public IAsyncResult BeginUpdateDestination(UpdateDestinationRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; return(BeginInvoke <UpdateDestinationRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateDestination operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateDestination operation on AmazonKinesisFirehoseClient.</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> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/firehose-2015-08-04/UpdateDestination">REST API Reference for UpdateDestination Operation</seealso> public void UpdateDestinationAsync(UpdateDestinationRequest request, AmazonServiceCallback <UpdateDestinationRequest, UpdateDestinationResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <UpdateDestinationRequest, UpdateDestinationResponse> responseObject = new AmazonServiceResult <UpdateDestinationRequest, UpdateDestinationResponse>((UpdateDestinationRequest)req, (UpdateDestinationResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <UpdateDestinationRequest>(request, marshaller, unmarshaller, options, callbackHelper); } #endregion }
/// <summary> /// Initiates the asynchronous execution of the UpdateDestination operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateDestination 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<UpdateDestinationResponse> UpdateDestinationAsync(UpdateDestinationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; return InvokeAsync<UpdateDestinationRequest,UpdateDestinationResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Updates the specified destination of the specified delivery stream. /// /// /// <para> /// This operation can be used to change the destination type (for example, to replace /// the Amazon S3 destination with Amazon Redshift) or change the parameters associated /// with a given destination (for example, to change the bucket name of the Amazon S3 /// destination). The update may not occur immediately. The target delivery stream remains /// active while the configurations are updated, so data writes to the delivery stream /// can continue during this process. The updated configurations are normally effective /// within a few minutes. /// </para> /// /// <para> /// If the destination type is the same, Amazon Kinesis Firehose merges the configuration /// parameters specified in the <a>UpdateDestination</a> request with the destination /// configuration that already exists on the delivery stream. If any of the parameters /// are not specified in the update request, then the existing configuration parameters /// are retained. For example, in the Amazon S3 destination, if <a>EncryptionConfiguration</a> /// is not specified then the existing <a>EncryptionConfiguration</a> is maintained on /// the destination. /// </para> /// /// <para> /// If the destination type is not the same, for example, changing the destination from /// Amazon S3 to Amazon Redshift, Amazon Kinesis Firehose does not merge any parameters. /// In this case, all parameters must be specified. /// </para> /// /// <para> /// Amazon Kinesis Firehose uses the <code>CurrentDeliveryStreamVersionId</code> to avoid /// race conditions and conflicting merges. This is a required field in every request /// and the service only updates the configuration if the existing configuration matches /// the <code>VersionId</code>. After the update is applied successfully, the <code>VersionId</code> /// is updated, which can be retrieved with the <a>DescribeDeliveryStream</a> operation. /// The new <code>VersionId</code> should be uses to set <code>CurrentDeliveryStreamVersionId</code> /// in the next <a>UpdateDestination</a> operation. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateDestination service method.</param> /// /// <returns>The response from the UpdateDestination service method, as returned by KinesisFirehose.</returns> /// <exception cref="Amazon.KinesisFirehose.Model.ConcurrentModificationException"> /// Another modification has already happened. Fetch <code>VersionId</code> again and /// use it to update the destination. /// </exception> /// <exception cref="Amazon.KinesisFirehose.Model.InvalidArgumentException"> /// The specified input parameter has an value that is not valid. /// </exception> /// <exception cref="Amazon.KinesisFirehose.Model.ResourceInUseException"> /// The resource is already in use and not available for this operation. /// </exception> /// <exception cref="Amazon.KinesisFirehose.Model.ResourceNotFoundException"> /// The specified resource could not be found. /// </exception> public UpdateDestinationResponse UpdateDestination(UpdateDestinationRequest request) { var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; return Invoke<UpdateDestinationRequest,UpdateDestinationResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdateDestination operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateDestination operation on AmazonKinesisFirehoseClient.</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 EndUpdateDestination /// operation.</returns> public IAsyncResult BeginUpdateDestination(UpdateDestinationRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; return BeginInvoke<UpdateDestinationRequest>(request, marshaller, unmarshaller, callback, state); }
public void UpdateDestinationMarshallTest() { var request = InstantiateClassGenerator.Execute<UpdateDestinationRequest>(); var marshaller = new UpdateDestinationRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<UpdateDestinationRequest>(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("UpdateDestination").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = UpdateDestinationResponseUnmarshaller.Instance.Unmarshall(context) as UpdateDestinationResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the UpdateDestination operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateDestination operation on AmazonKinesisFirehoseClient.</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 UpdateDestinationAsync(UpdateDestinationRequest request, AmazonServiceCallback<UpdateDestinationRequest, UpdateDestinationResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new UpdateDestinationRequestMarshaller(); var unmarshaller = UpdateDestinationResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<UpdateDestinationRequest,UpdateDestinationResponse> responseObject = new AmazonServiceResult<UpdateDestinationRequest,UpdateDestinationResponse>((UpdateDestinationRequest)req, (UpdateDestinationResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<UpdateDestinationRequest>(request, marshaller, unmarshaller, options, callbackHelper); }