Ejemplo n.º 1
0
        internal DeleteEventSourceMappingResponse DeleteEventSourceMapping(DeleteEventSourceMappingRequest request)
        {
            var marshaller   = new DeleteEventSourceMappingRequestMarshaller();
            var unmarshaller = DeleteEventSourceMappingResponseUnmarshaller.Instance;

            return(Invoke <DeleteEventSourceMappingRequest, DeleteEventSourceMappingResponse>(request, marshaller, unmarshaller));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteEventSourceMapping operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DeleteEventSourceMapping 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 <DeleteEventSourceMappingResponse> DeleteEventSourceMappingAsync(DeleteEventSourceMappingRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DeleteEventSourceMappingRequestMarshaller();
            var unmarshaller = DeleteEventSourceMappingResponseUnmarshaller.Instance;

            return(InvokeAsync <DeleteEventSourceMappingRequest, DeleteEventSourceMappingResponse>(request, marshaller,
                                                                                                   unmarshaller, cancellationToken));
        }
Ejemplo n.º 3
0
        public static bool DeleteEventSourceMapping(string uuid)
        {
            bool isSuccess = false;

            try
            {
                AmazonLambdaClient lambdaClient;

                using (lambdaClient = new AmazonLambdaClient(Models.MyAWSConfigs.KinesisRegion))
                {
                    DeleteEventSourceMappingRequest request = new DeleteEventSourceMappingRequest
                    {
                        UUID = uuid,
                    };
                    DeleteEventSourceMappingResponse response = lambdaClient.DeleteEventSourceMapping(request);
                    isSuccess = true;

                    Thread.Sleep(1 * 1000);

                    //if (response.HttpStatusCode == System.Net.HttpStatusCode.OK)
                    //    isSuccess = true;
                    //else
                    //    Console.WriteLine("Error deleting event source mapping");
                }
            }
            catch (AmazonLambdaException e)
            {
                Console.WriteLine("AmazonLambdaException: " + e);
            }
            catch (Exception e)
            {
                Console.WriteLine("Error: " + e);
            }

            return(isSuccess);
        }
 public void DeleteEventSourceMappingAsync(DeleteEventSourceMappingRequest request, AmazonServiceCallback <DeleteEventSourceMappingRequest, DeleteEventSourceMappingResponse> callback, AsyncOptions options = null)
 {
     throw new System.NotImplementedException();
 }